View Full Version : how to query setDrivenKey times and values?
06-22-2003, 07:19 PM
i was wondering if anyone knows how to query the values associated with set driven key animation curves?. i have tried:
keyframe -q timechange and keyframe -q valuechange
and it seems to work for regular animation curves, but not for SDK curves.
the only information i have to work with is the name of the object that is driven. There must be a way to find out the values of the keys...but i cant find it..
does anyone know??
06-26-2003, 03:09 PM
You must use the setDrivenKeyframe command instead of the keyframe command.
With this command, you can query values and so forth.
Hope this helps.
06-26-2003, 10:00 PM
couldn't you just query the values of the atributes driving/being driven?
06-26-2003, 10:14 PM
thanks fellas, I wanted to be able to query the animation node that is created for a SDK.
With the keyframs command, you can get all of the times of the different keys, and then get the matching values.
this only seems to work with regular animation, where the "time" is measured in frames. the setDrivenKey command will return the attributes and values of the driver and driven when you have the keyframe....but if you don't...I don't think it works..
I solved the problem though....I just duplicated the animation nodes and re-did the inputs and outputs for the other objects in my scene. no need to query anything now....
thanks for the help though fellas,
07-07-2004, 01:49 PM
OK, this is a bit late, but I stumbled upon this thread when I was looking for a way to query the output value of a driven key animation curve given an arbitary input value.
I found that if you want to query the output value of a driven key animation curve, you can use:
keyframe -attribute |the_attribute| -float |the_driver_value| -q -eval;
(Exchange |the_attribute| for the name of the attribute whose out value you want to query, e.g. translateY, and |the_driver_value| for the value of the driver attribute , e.g. 2.6).
This, I understand, is a fairly fast (execution-wise) way to get the value, since maya doesn't have to update the time or move things around to get the value.
I'm not sure this is what you were after in the first place though, but it might be of some help to someone else.
07-07-2004, 11:54 PM
if u pass the name of the name of the actual anim curve to the keyframe command, you can query any animCurve. this is pretty standard with all maya commands.
keyframe -q timechange animCurveNode
01-15-2006, 11:00 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.