PDA

View Full Version : time and expressions


ljilekor
02-05-2008, 06:04 PM
Hello

I'd like to add some lag on a tail animation using expressions. My main concern is that everything should refresh correctly...

I could use the following:
bone_1.rotateX= `getAttr -t (time-2) bone_0.rotateX`;

The main problem is that the expression is calculated only when I move the timeslider.

To prevent this, i need to use the dot(.) notation...
But how do I read an attribute's value at a specific time???

Is there a special kind of notation: ex.
bone_1.rotateX= bone_0.rotateX@(time-2);
or
bone_1.rotateX= bone_0.rotateX[time-2];
or something ???

Thx in advance for your concern.

Remi
02-05-2008, 06:57 PM
Is there a reason you want to use expressions for lag? You could do something like this with IK Spline and dynamics really really quickly, and i'm thinking if you adjust some of the param's you could get exactly what you're going for.

ljilekor
02-06-2008, 09:09 AM
I'm building a enormous squid tentacle. It's already driven by an IK spline and it blends gradually to FK (from base to tip).
I need the expressions to drive my FK.

But this is really too much info...

Q: Is there a specific dot(.) notation to query an attribute's value at a specific time?

I can not use 'getAttr -t TIME attr.obj' nor 'eval' because I want the expression to be interactive. (so I need to use the dot notation for expressions)

I'm afraid there's no other sollution (except diving into the API) than using the dot notation for expressions.
Is there somekind of specific notation within the dot notation that does what's required?
ex. attr.obj[TIME] or attr.obj@TIME

Thx

Galakgorr
02-08-2008, 12:30 AM
how about this...

use a scriptJob command that fires on -attributeChange to run your MEL. then you can use eval() and avoid dot notation entirely, and it still should be interactive.

or if -attributeChange doesn't work, there's a gazillion other scriptJob events and conditions you can use to run the script on demand. either way, scriptJob's what you want.

CGTalk Moderation
02-08-2008, 12:30 AM
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.