ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.
 keyframe [-absolute] [-adjustBreakdown boolean] [-animation string] [-attribute string] [-breakdown boolean] [-controlPoints boolean] [-eval] [-float floatrange] [-floatChange float] [-hierarchy string] [-includeUpperBound boolean] [-index uint] [-indexValue] [-keyframeCount] [-lastSelected] [-name] [-option string] [-relative] [-selected] [-shape boolean] [-tickDrawSpecial boolean] [-time timerange] [-timeChange time] [-valueChange float] 
[objects]
      
keyframe は、取り消し可能、照会可能、および編集可能です。
このコマンドは、キーセット上に作用します。キーセットは、1 つまたは複数のアニメーション カーブ上の指定したタイム レンジ内のキー グループとして定義されます。 キーセットを構成するアニメーション カーブは、「-animation」フラグの値に依存します。| int | (下記に記述があるもの以外)キーが修正されたカーブの数。照会モードでは、このコマンドは、下記の照会可能なフラグで記述されたとおり、さまざまなオブジェクトを返すことがあります。 | 
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
| -attribute(-at) | string |    | ||
| 
 | ||||
| -hierarchy(-hi) | string |   | ||
| 
 | ||||
| -shape(-s) | boolean |   | ||
| 
 | ||||
| -controlPoints(-cp) | boolean |   | ||
| 
 | ||||
| -index(-in) | uint |    | ||
| 
 | ||||
| -time(-t) | timerange |    | ||
| 
 | ||||
| -float(-f) | floatrange |    | ||
| 
 | ||||
| -includeUpperBound(-iub) | boolean |   | ||
| 
 | ||||
| -animation(-an) | string |   | ||
| 
 | ||||
| -absolute(-a) |  |   | ||
| 
 | ||||
| -relative(-r) |  |   | ||
| 
 | ||||
| -timeChange(-tc) | time |     | ||
| 
 | ||||
| -floatChange(-fc) | float |     | ||
| 
 | ||||
| -indexValue(-iv) |  |    | ||
| 
 | ||||
| -valueChange(-vc) | float |     | ||
| 
 | ||||
| -option(-o) | string |    | ||
| 
 | ||||
| -adjustBreakdown(-abd) | boolean |   | ||
| 
 | ||||
| -breakdown(-bd) | boolean |     | ||
| 
 | ||||
| -tickDrawSpecial(-tds) | boolean |    | ||
| 
 | ||||
| -keyframeCount(-kc) |  |    | ||
| 
 | ||||
| -name(-n) |  |    | ||
| 
 | ||||
| -eval(-ev) |  |    | ||
| 
 | ||||
| -selected(-sl) |  |    | ||
| 
 | ||||
| -lastSelected(-lsl) |  |    | ||
| 
 | ||||
|  フラグはコマンドの作成モードで表示できます |  フラグはコマンドの編集モードで表示できます | 
|  フラグはコマンドの照会モードで表示できます |  コマンド内でフラグを複数回使用できます。 | 
// 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;