Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.


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

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

timeWarp is undoable, queryable, and editable.

This command is used to create a time warp input to a set of animation curves.

Return value

stringtimeWarp name

In query mode, return type is based on queried flag.


fcurve, animCurve, animation, timing




deleteFrame, frame, g, interpType, moveFrame
Long name (short name) Argument types Properties
frame(f) float createqueryeditmultiuse
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.
interpType(it) [int, string] createqueryedit
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] queryedit
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.
deleteFrame(df) int edit
The flag value indicates the 0-based index of the warp frame to delete. This flag can only be used in edit mode.
g(g) boolean createqueryedit
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 command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

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
# Move the 2nd warp to frame 10
# Modify the interpolation between the 1st and 2nd warp to easeIn
# query the original frames
# Result: [1.0, 20.0, 30.0] #
# query the modified frames
# Result: [5.0, 10.0, 30.0] #
# query the interpolation
# Result: [u'easeIn', u'linear'] #