View Full Version : Detecting the number of instances of a controller

11 November 2005, 03:38 PM
I noticed that when applying mapped functions like insertTime() and deleteTime() to a collection of nodes, if some of the nodes share instanced controllers, the effect is applied multiple times on those controllers (once for each instance of the controller that exists). Is there any way to detect if a controller has other instances in existance to that the effect can be applied just once to a controller?


11 November 2005, 06:25 PM
Hi Jon,

You could use the refs.dependents const structdef to do this. Here's a start:

inst=for t in (refs.dependents x.anim) where isvalidnode t collect t
select inst


11 November 2005, 07:47 PM
Thanks, Josh! I'll start digging through that idea tonight when I get time.

CGTalk Moderation
11 November 2005, 07:47 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.