PDA

View Full Version : self targetting script controller


alteredgene
07-04-2011, 01:18 AM
Hi everyone, thank you in advance for your interest and time.

basically, i am trying to do some offset animation. set the key frame on the first object(objA), and have the rest of the object imitate the same animation as objA, but with delay.

i wanted some control on the delay, so was thinking of adding a custom attribute called "timeOffset" on each objects i wanted to delay, and insert number of frames i wanted that specific object to offset.

i was thinking of using script controller somewhere along the lines of..

at time (F+this.timeOffset) ($objA.pos.z)

basically this is what i was hoping to the parent object where the script controller is.

so basically i was hoping i could just copy and paste same script controller function, and they will read their own custom attributes, rather than having to edit each one of them to individually target to themselves.

however, i am finding that no such function as this exist in scriptController.

anyone could point me in the right direction?

edit:
actually, after further research, it seems that this is a valid command in script controller, however, it seems to target the actual script controller track it self. i guess then the question is, are there any way of getting "parent object" of the current target controller?

i guess what i am looking for is

this.parent

above code does not work unfortunately.

Thank you all in advance

floopyb
07-04-2011, 02:41 AM
would this help you:

refs.dependentNodes this firstOnly:true

lo
07-04-2011, 11:07 AM
also check out the 'tick offset' parameter in script controller dialog.

alteredgene
07-05-2011, 11:02 PM
would this help you:

refs.dependentNodes this firstOnly:true

thanks floopyB, works great!

infact, i have used "dependentNodes" before on my scripts previously, but guess i been blinded by looking for a simple way out.

again thank you very much for your help : )

alteredgene
07-05-2011, 11:03 PM
also check out the 'tick offset' parameter in script controller dialog.

but i guess i was looking for a script controller i could just copy and paste to other controller, while having control over the offset via custom attributes

thanks!

CGTalk Moderation
07-05-2011, 11:03 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.