How to procedurally set parent for joints?
349 10 3-
- fragmentzero
- Member
- 15 posts
- Joined: 1月 2013
- オフライン
-
- raincole
- Member
- 691 posts
- Joined: 8月 2019
- オフライン
Too little information... at which level? SOP Kinefx skeleton? APEX?
http://www.catb.org/~esr/faqs/smart-questions.html [www.catb.org]
its not working on my side
http://www.catb.org/~esr/faqs/smart-questions.html [www.catb.org]
-
- fragmentzero
- Member
- 15 posts
- Joined: 1月 2013
- オフライン
-
- tamte
- Member
- 9269 posts
- Joined: 7月 2007
- オンライン
you can use Parent Joints SOP, where you can specify joint and parent groups
this offers certain level of proceduralism as the groups can be specified using attribute values
so if you know maximum number of parent bones and its a reasonable number you can use provided UI, however if you need large number of parent bones, you may want to either use additional for loop or have a look inside how it works to rebuild a custom version
this offers certain level of proceduralism as the groups can be specified using attribute values
so if you know maximum number of parent bones and its a reasonable number you can use provided UI, however if you need large number of parent bones, you may want to either use additional for loop or have a look inside how it works to rebuild a custom version
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- fragmentzero
- Member
- 15 posts
- Joined: 1月 2013
- オフライン
I see.
So its not as simple as just @parent = "ptnum of parent" in Point Wrangle.
I do want to avoid Parent Joints SOP, so I'll try out the 2nd/3rd approaches.
This is my first foray into KineFX tools, which I am pairing with Control Rig in Unreal. So trying to keep both ends as procedural as possible.
Thank you
So its not as simple as just @parent = "ptnum of parent" in Point Wrangle.
I do want to avoid Parent Joints SOP, so I'll try out the 2nd/3rd approaches.
This is my first foray into KineFX tools, which I am pairing with Control Rig in Unreal. So trying to keep both ends as procedural as possible.
Thank you
-
- tamte
- Member
- 9269 posts
- Joined: 7月 2007
- オンライン
no need to avoid it since as I said you can run it in for loop for each unique value of your i@parent attrib
but if you want pure VEX solution, here is something ripped from inside of Parent Joints and adjusted to be able to use your i@parent attribute, just make sure any joint that you dont want to parent has @parent=-1
but if you want pure VEX solution, here is something ripped from inside of Parent Joints and adjusted to be able to use your i@parent attribute, just make sure any joint that you dont want to parent has @parent=-1
#include <kinefx_hierarchy.h> int unparent_on_cycle = chi("unparent_on_cycle"); int joints[] = expandpointgroup( 0, "@parent!=-1" ); int success = 1; int failed[]; foreach ( int joint; joints ){ int parent = point( 0, "parent", joint ); int _success = setparent(0, joint, parent, unparent_on_cycle); if(!_success) append(failed, joint); success &= _success; } if(!success) warning("One or more parenting operations has failed.\nPoints %d", failed);
Tomas Slancik
CG Supervisor
Framestore, NY
CG Supervisor
Framestore, NY
-
- fragmentzero
- Member
- 15 posts
- Joined: 1月 2013
- オフライン
-
- fragmentzero
- Member
- 15 posts
- Joined: 1月 2013
- オフライン
-
- tamte
- Member
- 9269 posts
- Joined: 7月 2007
- オンライン
-
- edward
- Member
- 8062 posts
- Joined: 7月 2005
- オフライン
-
- fragmentzero
- Member
- 15 posts
- Joined: 1月 2013
- オフライン
-
- Quick Links