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

Synopsis

timeWarp [-deleteFrame int] [-frame float] [-global] [-interpType int string] [-moveFrame int float]

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.

Keywords

fcurve, animCurve, animation, timing

Related

setKeyframe

Flags

deleteFrame, frame, global, 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.
-global(-g) 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 be used more than once in a command.

MEL examples

// Create a time warp on the animation curves driving a cylinder and a sphere,
// and specify the warping is to occur at frames 1, 20 and 30.
// Note: Time warps are only applied to animated objects.
//
string $warp = `timeWarp -f 1 -f 20 -f 30 pCylinder1 pSphere1`;
// Move the first warp to frame 5
//
timeWarp -e -mf 0 5 $warp;
// Move the 2nd warp to frame 10
//
timeWarp -e -mf 1 10 $warp;
// Modify the interpolation between the 1st and 2nd warp to easeIn
//
timeWarp -e -it 0 easeIn $warp;
// query the original frames
//
timeWarp -q -f $warp;
// Result: 1 20 30 //
// query the modified frames
//
timeWarp -q -mf $warp;
// Result: 5 10 30 //
// query the interpolation
//
timeWarp -q -it $warp;
// Result: easeIn linear //