[Closed] get all controller children
I have a scene with a huge list of objects, some of them with spring controllers on them, some with position lists etc. I need a way to get all controllers under position/ rotation (they can be springs/ position lists/. or just XYZ postions) in an array. In other words I need all the child controllers of $.position.controller , iterating till the leaf node.
I would really appreciate any help on this.
Cheers,
Vikram
Look into subAnims rather than controllers. You can get controllers from the subAnims, and I found they are a little more generalized and easier for setting up recursion, which is what you’ll be looking at doing. Use getSubAnimNames to get all child tracks of the provided object. If anything is returned from that, use the subAnimName to get the subAnims, then cycle through those checking each one for a controller and more subAnims.