ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. Python 例.

概要

timeWarp([deleteFrame=int], [frame=float], [g=boolean], [interpType=[int, string]], [moveFrame=[int, float]])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

timeWarp は、取り消し可能、照会可能、および編集可能です。

このコマンドは、アニメーション カーブのセットに対するタイム ワープ入力の作成に使用されます。

戻り値

stringtimeWarp 名

照会モードでは、戻り値のタイプは照会されたフラグに基づきます。

キーワード

fcurve, animCurve, animation, timing

関連

setKeyframe

フラグ

deleteFrame, frame, g, interpType, moveFrame
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
deleteFrame(df) int edit
フラグの値は、削除するワープ フレームの 0 ベースのインデックスを示します。このフラグは編集モードでのみ使用できます。
frame(f) float createqueryeditmultiuse
作成モードと編集モードでは、このフラグを使用してワープ操作に追加するワープ フレームを指定できます。照会モードでは、このフラグはワープが実行されるフレームの値のリストを返します。moveFrame フラグ コマンドを使用して、関連付けられたワープ値を照会できます。
g(g) boolean createqueryedit
作成モードでは、シーン内でアニメートされるオブジェクトすべてに影響するグローバル タイム ワープ ノードを作成します。照会モードでは、グローバル タイム ワープ ノードを返します。注: シーン内に存在できるグローバル タイム ワープは 1 つだけです。
interpType(it) [int, string] createqueryedit
このフラグを使用して、指定したスパンの補間タイプを設定できます。有効な補間タイプは、linear、easeIn、および easeOut です。照会された場合、指定したタイム ワープの補間タイプの文字列配列を返します。
moveFrame(mf) [int, float] queryedit
このフラグを使用して、単独のワープ フレームを移動できます。最初に指定する値は、移動するワープ フレームの 0 ベースのインデックスを示します。2 番目の値は、新しいワープ フレーム値を示します。このフラグは、編集モードと照会モードでのみ使用できます。照会すると、ワープ フレームの値の配列が返されます。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

# Create a time warp on the animation curves driving a cylinder and a sphere,
# and specify the warping is to occur at frames 1 and 20.
# Note: Time warps are only applied to animated objects.
#
warp = cmds.timeWarp( 'pCylinder1', 'pSphere1',f=[1,20])

# Move the first warp to frame 5
#
cmds.timeWarp(warp,e=1,mf=(0,5))

# Move the 2nd warp to frame 10
#
cmds.timeWarp(warp,e=1,mf=(1,10))

# Modify the interpolation between the 1st and 2nd warp to easeIn
#
cmds.timeWarp(warp,e=1,it=(0,'easeIn'))

# query the original frames
#
cmds.timeWarp(warp,q=1,f=1)
# Result: [1.0, 20.0, 30.0] #

# query the modified frames
#
cmds.timeWarp(warp,q=1,mf=1)
# Result: [5.0, 10.0, 30.0] #

# query the interpolation
#
cmds.timeWarp(warp,q=1,it=1)
# Result: [u'easeIn', u'linear'] #