Getting List of Joints

I need to get a list containing all joint names with parenting.

I know about actor.listJoints() but it only prints the joints to the console, instead of actually returning a list.

Try actor.getJoints().

David

It returns a list of names, but they are not strings, and they do not include parenting.

It returns a list of CharacterJoint objects. You can get the string name of each joint with joint.getName().

If you want the parent-child relationship of the joints, you should consider simply walking the joint hierarchy yourself. Start with node = actor.getPartBundle(‘modelRoot’), which is the root of the joint hierarchy, then recursively walk through node.getChildren() each time to get the children of each node.

David

Thanks!