ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
cutKey(
[targetList]
, [animation=string], [attribute=string], [clear=boolean], [controlPoints=boolean], [float=floatrange], [hierarchy=string], [includeUpperBound=boolean], [index=uint], [option=string], [selectKey=boolean], [shape=boolean], [time=timerange])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
cutKey は、取り消し可能、照会不可能、および編集不可能です。
このコマンドは、キーセット上に作用します。キーセットは、1 つまたは複数のアニメーション カーブ上の指定したタイム レンジ内のキー グループとして定義されます。キーセットを構成するアニメーション カーブは、「-animation」フラグの値に依存します。
-animation フラグを使用して、「translateX」など attributeName という形式の引数を取る、多目的な -attribute フラグによって固有に識別されるカーブをオーバーライドすることができます。
アニメーション カーブ上の各キーは、カーブの時間値またはインデックスによって識別されます。時間とインデックスは、単独にあるいはリストの一部または範囲として指定することができます(例を参照)。
cutKey コマンドは、指定したターゲットからカーブ セグメントの階層をカットし、クリップボードに置きます。pasteKey コマンドを使うと、それらのカーブがほかのオブジェクトへペーストされます。
クリップボードにあるカットしたカーブのシェイプ、ソース アニメーション カーブへの cutKey コマンドの影響は、指定した cutKey の[「-option」によって異なります。以下のオプションについては、それぞれ例を用いて説明します。すべての説明において、ソース アニメーション カーブ(キーのカット元)には、10、15、20、25、30 の 5 つのキーフレームがあるものとします。
TbaseKeySetCmd.h
int | カットしたアニメーション カーブの数。 |
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
animation(an)
|
string
|
![]() |
||
|
||||
attribute(at)
|
string
|
![]() ![]() |
||
|
||||
clear(cl)
|
boolean
|
![]() |
||
|
||||
controlPoints(cp)
|
boolean
|
![]() |
||
|
||||
float(f)
|
floatrange
|
![]() ![]() |
||
|
||||
hierarchy(hi)
|
string
|
![]() |
||
|
||||
includeUpperBound(iub)
|
boolean
|
![]() |
||
|
||||
index(index)
|
uint
|
![]() ![]() |
||
|
||||
option(o)
|
string
|
![]() |
||
|
||||
selectKey(sl)
|
boolean
|
![]() |
||
|
||||
shape(s)
|
boolean
|
![]() |
||
|
||||
time(t)
|
timerange
|
![]() ![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # Keys on animation curves are identified by either # their time values or their indices. Times and indices can # be given as a range or list of ranges. # time=('10pal','10pal') means the key at frame 10 (PAL format). # time=[(1.0,1.0),('15ntsc','15ntsc'),(20,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=(0,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,0) means the first key of each animation curve. (Indices are 0-based.) # index=[(2,2),(5,5),(7,7)] means the 3rd, 6th, and 8th keys. # index=(1,5) means the 2nd, 3rd, 4th, 5th, and 6th keys of each animation curve. # Cut keyframes from frame 10 to 20 of cube1's "Translate X" attribute # cmds.cutKey( 'cube1', time=(10,20), attribute='translateX', option="keys" ) # Cut from all active objects all keys in the range 0 to 60 # cmds.cutKey( time=(0,60) )