PDA

View Full Version : Find instanced controllers


grabjacket
02-12-2009, 10:30 AM
Hello,

Is there a way to collect instanced controllers?

Example:
I've got some spheres. These spheres have their y_position controller instanced. I'd like to select one controller and search the scene for any instances of the controller.
Something similar is possible in the schematic view with the "list views/instances" dialog. This coughs up a list of just those controllers being instanced. But from what i've read in the help, i can open this dialog by script, but not get the contents of it.

Klaas

ZeBoxx2
02-12-2009, 12:42 PM
try...
refs.dependents <controller>

e.g.

refs.dependents $.position.y_position.controller

That should return an array of all things that depend on that controller. Then just process only the elements of that array that are other nodes (via e.g. 'isKindOf <element> <class>')

CGTalk Moderation
02-12-2009, 12:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.