Go to: Return value. Related commands. Flags. Examples.
absolute, adjustBreakdowns, animation, attribute, breakdown, controlPoints, eval, float, floatChange, hierarchy, includeUpperBound, index, indexValue, keyframeCount, lastSelected, name, option, relative, selected, shape, tickDrawSpecial, time, timeChange, valueChange
![]() | ![]() |
![]() | ![]() |
// Two ways to find out how many keys there are on the // paramCurve connected to surface1.translateX; // keyframe -attribute translateX -query -keyframeCount surface1; keyframe -query -keyframeCount surface1.translateX; // Query all keyframes of object "polySurface1" // with in the time range 0 to 20. // keyframe -time "0:20" -query -timeChange -valueChange surface1 // Query just the time of the first key in the // "Translate X" parameter curve. Note that the indices // are 0-based. // keyframe -index 0 -query "surface1.translateX" // Shift all the active object's keys in the range 10-20 // by one (current) time unit (frame, second, etc.) // keyframe -edit -relative -timeChange 1 -time "10:20" // Two ways to move all keys at time 10 of // the active object to time 12. Note that "-absolute" // is the default. // keyframe -time 10 -timeChange 12 keyframe -time 10 -absolute -timeChange 12 // Set the 2nd keyframe of cube1's Translate X parameter // curve to be 10.25 at time 1.5 seconds. // keyframe -edit -index 1 -timeChange 1.5sec -valueChange 10.25 "surface1.translateX" // Evaluate the animCurve feeding into nurbsCone1's translateX attribute at time 3 // keyframe -at tx -t 3 -q -eval nurbsCone1; // Query the times of the active keys on attribute translateX of nurbsCone1 // keyframe -at tx -sl -q -tc nurbsCone1; // How many keys are selected on nurbsCone1? // keyframe -sl -q -kc nurbsCone1; // Here's a script to print out all a cone's animCurves that have // keys selected. Each animCurve is followed by a list of times // for the selected keys. The result of this script is: // nurbsCone1_translateX: 5 // nurbsCone1_translateY: 12 // nurbsCone1_translateZ: 4 14 // string $myCone[] = `cone`; setKeyframe -t 0 -t 5 -t 10 -at tx -v 5 $myCone[0]; setKeyframe -t 2 -t 7 -t 12 -at ty -v 10 $myCone[0]; setKeyframe -t 4 -t 9 -t 14 -at tz -v 15 $myCone[0]; selectKey -t 5 -t 12 -t 4; selectKey -animation objects -add -t 14; float $keyTimes[]; string $nodes[] = `keyframe -q -name $myCone`; for( $node in $nodes ) { $keyTimes = `keyframe -sl -q -tc $node`; print ($node + ": "); for( $time in $keyTimes ) { print( $time + " " ); } print "\n"; } // For the above sample script, the last selected key is // nurbsCone1_translateZ: 14. The following may be used to query // the values for that key // keyframe -query -lastSelected -name; keyframe -query -lastSelected -timeChange; keyframe -query -lastSelected -valueChange;