PDA

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


Jon-Huhn
11-09-2005, 02: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?

Thanks!

j-man
11-09-2005, 05:25 PM
Hi Jon,

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


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

Josh.

Jon-Huhn
11-09-2005, 06:47 PM
Thanks, Josh! I'll start digging through that idea tonight when I get time.

CGTalk Moderation
11-09-2005, 06: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.