ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.
pasteKey(
[objects]
, [animLayer=string], [animation=string], [attribute=string], [clipboard=string], [connect=boolean], [copies=uint], [float=floatrange], [floatOffset=float], [includeUpperBound=boolean], [index=uint], [matchByName=boolean], [option=string], [time=timerange], [timeOffset=time], [valueOffset=float])
注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。
pasteKey は、取り消し可能、照会可能、および編集可能です。
クリップボードから別のオブジェクトかカーブにカーブ セグメント階層をペーストします。コピーかカットを行ったカーブ セグメントのオブジェクト階層が、ペースト先のオブジェクト階層と一致しない場合、pasteKey は階層内で一致する部分をペーストします。1 つのオブジェクトのアニメーションがクリップボード上にある場合は、それぞれの対象オブジェクトにペーストされます。複数のオブジェクトのアニメーションがクリップボード上にある場合は、どのアニメーションがどのオブジェクトにペーストされるかがセレクション リストの順序で決まります。次のような操作が有効です。
TbaseKeySetCmd.h
指定したオブジェクトのアトリビュートにクリップボードのキーセットがペーストされる方法は、指定した「-option」によって決まります。以下のオプションについては、それぞれ例を用いて説明します。すべての説明では、クリップボードのキーセットに 20 フレームのアニメーションを含むカーブ セグメントが存在すると仮定します(カーブ セグメントをクリップボードに保存するには、cutKey コマンドか copyKey コマンドを使用します)。ペースト先のアニメーション カーブは、対象カーブと呼びます。
int | 貼り付けられたカーブの数 |
照会モードでは、戻り値のタイプは照会されたフラグに基づきます。
ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
---|---|---|---|---|
animLayer(al)
|
string
|
![]() |
||
|
||||
animation(an)
|
string
|
![]() |
||
|
||||
attribute(at)
|
string
|
![]() ![]() |
||
|
||||
clipboard(cb)
|
string
|
![]() |
||
|
||||
connect(c)
|
boolean
|
![]() |
||
|
||||
copies(cp)
|
uint
|
![]() |
||
|
||||
float(f)
|
floatrange
|
![]() |
||
|
||||
floatOffset(fo)
|
float
|
![]() |
||
|
||||
includeUpperBound(iub)
|
boolean
|
![]() |
||
|
||||
index(index)
|
uint
|
![]() |
||
|
||||
matchByName(mn)
|
boolean
|
![]() |
||
|
||||
option(o)
|
string
|
![]() |
||
|
||||
time(t)
|
timerange
|
![]() |
||
|
||||
timeOffset(to)
|
time
|
![]() |
||
|
||||
valueOffset(vo)
|
float
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
import maya.cmds as cmds # Paste keyframes onto nurbsSphere1's translateX attribute at time 10 # cmds.pasteKey( 'nurbsSphere1', time=(10,10), attribute='translateX' ) # Paste to all active objects, preserving the timing from the clipboard. # cmds.pasteKey()