This command is used to create a time warp input to a set of animation curves.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
deleteFrame (df) | int | ||
|
|||
frame (f) | float | ||
In create and edit mode, this flag can be used to specify warp frames added to the warp operation. In query mode, this flag returns a list of the frame values where warping occurs. The moveFrame flag command can be used to query the associated warped values. |
|||
g (g) | bool | ||
In create mode, creates a global time warp node which impacts every animated object in the scene. In query mode, returns the global time warp node. Note: only one global time warp can exist in the scene.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
interpType (it) | int, unicode | ||
This flag can be used to set the interpolation type for a given span. Valid interpolation types are linear, easeIn and easeOut. When queried, it returns a string array of the interpolation types for the specified time warp. |
|||
moveFrame (mf) | int, float | ||
This flag can be used to move a singular warp frame. The first value specified indicates the 0-based index of the warp frame to move. The second value indicates the new warp frame value. This flag can only be used in edit and query mode. When queried, it returns an array of the warped frame values. |
Derived from mel command maya.cmds.timeWarp
Example:
import pymel.core as pm
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 = pm.timeWarp( 'pCylinder1', 'pSphere1',f=[1,20])
# Move the first warp to frame 5
#
pm.timeWarp(warp,e=1,mf=(0,5))
# Move the 2nd warp to frame 10
#
pm.timeWarp(warp,e=1,mf=(1,10))
# Modify the interpolation between the 1st and 2nd warp to easeIn
#
pm.timeWarp(warp,e=1,it=(0,'easeIn'))
# query the original frames
#
pm.timeWarp(warp,q=1,f=1)
[1.0, 20.0, 30.0]
# query the modified frames
#
pm.timeWarp(warp,q=1,mf=1)
[5.0, 10.0, 30.0]
# query the interpolation
#
pm.timeWarp(warp,q=1,it=1)
[u'easeIn', u'linear']