ジャンプ先: 概要. 戻り値. 関連. フラグ. MEL 例.
keyframe [-absolute] [-adjustBreakdown boolean] [-animation string] [-attribute string] [-breakdown boolean] [-clipTime time time float] [-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 | (下記に記述があるもの以外)キーが修正されたカーブの数。照会モードでは、このコマンドは、下記の照会可能なフラグで記述されたとおり、さまざまなオブジェクトを返すことがあります。 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
-absolute(-a)
|
|
|||
|
||||
-adjustBreakdown(-abd)
|
boolean
|
|||
|
||||
-animation(-an)
|
string
|
|||
|
||||
-attribute(-at)
|
string
|
|||
|
||||
-breakdown(-bd)
|
boolean
|
|||
|
||||
-clipTime(-ct)
|
time time float
|
|||
|
||||
-controlPoints(-cp)
|
boolean
|
|||
|
||||
-eval(-ev)
|
|
|||
|
||||
-float(-f)
|
floatrange
|
|||
|
||||
-floatChange(-fc)
|
float
|
|||
|
||||
-hierarchy(-hi)
|
string
|
|||
|
||||
-includeUpperBound(-iub)
|
boolean
|
|||
|
||||
-index(-in)
|
uint
|
|||
|
||||
-indexValue(-iv)
|
|
|||
|
||||
-keyframeCount(-kc)
|
|
|||
|
||||
-lastSelected(-lsl)
|
|
|||
|
||||
-name(-n)
|
|
|||
|
||||
-option(-o)
|
string
|
|||
|
||||
-relative(-r)
|
|
|||
|
||||
-selected(-sl)
|
|
|||
|
||||
-shape(-s)
|
boolean
|
|||
|
||||
-tickDrawSpecial(-tds)
|
boolean
|
|||
|
||||
-time(-t)
|
timerange
|
|||
|
||||
-timeChange(-tc)
|
time
|
|||
|
||||
-valueChange(-vc)
|
float
|
|||
|
フラグはコマンドの作成モードで表示できます | フラグはコマンドの編集モードで表示できます |
フラグはコマンドの照会モードで表示できます | コマンド内でフラグを複数回使用できます。 |
// Keys on animation curves are identified by either // their time values or their indices. Times and indices can // be given individually or as part of a list or range. // -time 10pal means the key at frame 10 (PAL format). // -time 1.0sec -time 15ntsc -time 20 means the keys at time 1.0 second, frame 15 (in NTSC format), and time 20 (in the currently defined global time unit). // -time "10:20" means all keys in the range from 10 to 20, inclusive, in the current time unit. // Omitting one end of a range means "go to infinity", as in the following examples: // -time "10:" means all keys from time 10 (in the current time unit) onwards. // -time ":10" means all keys up to (and including) time 10 (in the current time unit). // -time ":" is a short form to specify all keys. // -index 0 means the first key of each animation curve. (Indices are 0-based.) // -index 2 -index 5 -index 7 means the 3rd, 6th, and 8th keys. // -index "1:5" means the 2nd, 3rd, 4th, 5th, and 6th keys of each animation curve. // 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;