How to find all children's of a "joint" ?

   834   2   1
User Avatar
Member
11 posts
Joined: May 2018
Offline
Hi,

Given a skeleton (kineFX) is there an easy way to create a per point (joint) attribute that contains an array of all it's children joints (indices or names)?

Thanks!
=e
Edited by erikmlv - Jan. 9, 2025 17:24:28
User Avatar
Member
33 posts
Joined: Nov. 2016
Offline
You could include the kinefx_hierarchy.h file and use the getchildren function to get immediate children or getdescendants to get all descendents.

#include <kinefx_hierarchy.h>

i[]@children = getchildren(0, @ptnum);
int maxdepth = 1000;
i[]@descendants = getdescendants(0, @ptnum, maxdepth);

This header file and other useful kinefx functions should be found here $HFS/packages/kinefx/vex/include
Edited by gorrod - Jan. 9, 2025 18:02:02

Attachments:
kinefx_hierarchy.hipnc (112.9 KB)

User Avatar
Member
11 posts
Joined: May 2018
Offline
Thank you so much, that's exactly what I needed!

Best,
=e
  • Quick Links