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

Synopsis

clipSchedule [-absolute boolean] [-absoluteRotations boolean] [-allAbsolute] [-allRelative] [-blend uint uint] [-blendNode uint uint] [-blendUsingNode string] [-character] [-clipIndex uint] [-cycle float] [-defaultAbsolute] [-enable boolean] [-group boolean] [-groupIndex uint] [-groupName string] [-hold time] [-insertTrack uint] [-instance string] [-listCurves] [-listPairs] [-lock boolean] [-mute boolean] [-name string] [-postCycle float] [-preCycle float] [-remove] [-removeBlend uint uint] [-removeEmptyTracks] [-removeTrack uint] [-rotationsAbsolute] [-scale float] [-shift int] [-shiftIndex uint] [-solo boolean] [-sourceClipName] [-sourceEnd time] [-sourceStart time] [-start time] [-track uint] [-weight float] [-weightStyle uint]

clipSchedule is undoable, queryable, and editable.

This command is used to create, edit and query clips and blends in the Trax editor. It operates on the clipScheduler node attached to the character. In query mode, if no flags are specified, returns an array of strings in this form: (clipName,clipIndex,clipStart,clipSourceStart,clipSourceEnd,clipScale,clipPreCycle,clipPostCycle,clipHold)

Return value

stringClip name

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

Keywords

character, clip, animation

Related

bakeClip, character, characterMap, clip, clipEditor

Flags

absolute, absoluteRotations, allAbsolute, allRelative, blend, blendNode, blendUsingNode, character, clipIndex, cycle, defaultAbsolute, enable, group, groupIndex, groupName, hold, insertTrack, instance, listCurves, listPairs, lock, mute, name, postCycle, preCycle, remove, removeBlend, removeEmptyTracks, removeTrack, rotationsAbsolute, scale, shift, shiftIndex, solo, sourceClipName, sourceEnd, sourceStart, start, track, weight, weightStyle
Long name (short name) Argument types Properties
-clipIndex(-ci) uint createquery
Specify the index of the clip to schedule. In query mode, returns an array of strings in this form: (clipName,index,start,sourceStart,sourceEnd,scale,preCycle,postCycle)

In query mode, this flag can accept a value.

-start(-s) time createquery
Specify the placement of the start of the clip
-sourceStart(-ss) time createquery
Specify where to start in the source clip's animation curves
-sourceEnd(-se) time createquery
Specify where to end in the source clip's animation curves
-preCycle(-prc) float createquery
Specify the number of times to repeat the clip before its normal start.
-postCycle(-poc) float createquery
Specify the number of times to repeat the clip after its normal end.
-hold(-ph) time createquery
Specify how long to hold the last value of the clip after its normal or cycled end.
-scale(-sc) float createquery
Specify the amount to scale the clip. Values must be greater than 0.
-absolute(-abs) boolean queryedit
This flag is now deprecated. Use aa/allAbsolute, ar/allRelative, ra/rotationsAbsolute, or da/defaultAbsolute instead. This flag controls whether the clip follows its keyframe values or whether they are offset by a value to maintain a smooth path.
-absoluteRotations(-abr) boolean queryedit
This flag is now deprecated. Use aa/allAbsolute, ar/allRelative, ra/rotationsAbsolute, or da/defaultAbsolute instead. If true, this overrides the abs/absolute flag so that rotation channels are always calculated with absolute offsets. This allows you to have absolute offsets on rotations and relative offsets on all other channels.
-allAbsolute(-aa) edit
Set all channels to be calculated with absolute offsets. This flag cannot be used in conjunction with the ar/allRelative, ra/rotationsAbsolute or da/defaultAbsolute flags.
-allRelative(-ar) edit
Set all channels to be calculated with relative offsets. This flag cannot be used in conjunction with the aa/allAbsolute, ra/rotationsAbsolute or da/defaultAbsolute flags.
-rotationsAbsolute(-ra) edit
Set all channels except rotations to be calculated with relative offsets. Rotation channels will be calculated with absolute offsets. This flag cannot be used in conjunction with the aa/allAbsolute, ar/allRelative or da/defaultAbsolute flags.
-defaultAbsolute(-da) edit
Sets all top-level channels except rotations in the clip to relative, and the remaining channels to absolute. This is the default during clip creation if no offset flag is specified. This flag cannot be used in conjunction with the aa/allAbsolute, ar/allRelative, or ra/rotationsAbsolute flags.
-instance(-in) string create
Create an instanced copy of the named clip. An instanced clip is one that is linked to an original clip. Thus, changes to the animation curve of the original curve will also modify all instanced clips. The name of the instanced clip is returned as a string.
-remove(-rm) create
This flag is used to remove a clip from the timeline. It must be used in conjunction with the ci/clipIndex flag. The specified clip will be removed from the timeline, but will still exist in the library and any instanced clips will remain in the timeline. To permanently remove a clip from the scene, the clip command should be used instead.
-enable(-en) boolean createquery
This flag is used to enable or disable a clip. It must be used in conjunction with the ci/clipIndex flag. The specified clip will be enabled or disabled.
-blend(-b) uint uint createquery
This flag is used to blend two clips, whose indices are provided as flag arguments.
-blendUsingNode(-bun) string create
This flag is used if you want to blend using an existing blend node. It is used in conjunction with the blend flag. The blend flag specifies the clip indices for the blend. The name of an existing animBlend node should be supplied supplied as an argument for the blendUsingNode flag.
-blendNode(-bn) uint uint query
This query only flag list all of the blend nodes associated with the blend defined by the two clip indices. This flag returns a string array.

In query mode, this flag can accept a value.

-removeBlend(-rb) uint uint create
This flag is used to remove an existing blend between two clips, whose indices are provided as flag arguments.
-character(-ch) query
This flag is used to query which characters this scheduler controls. It returns an array of strings.
-listCurves(-lc) createquery
This flag is used to list the animation curves associated with a clip. It should be used in conjunction with the clipIndex flag, which specifies the clip of interest.
-name(-n) string createquery
This flag is used to query the name of the clip node associated with the specified clip index, or to specify the name of the instanced clip during instancing.

In query mode, this flag can accept a value.

-sourceClipName(-scn) createquery
This flag is used to query the name of the source clip node associated with the specified clip index.
-weight(-w) float createquery
This flag is used in to set or query the weight of the clip associated with the specified clip index.
-weightStyle(-ws) uint createquery
This flag is used to set or query the weightStyle attribute of the clip associated with the specified clip index.
-lock(-l) boolean queryedit
This flag specifies whether clips on a track are to be locked or not. Must be used in conjuction with the track flag.
-solo(-so) boolean queryedit
This flag specifies whether clips on a track are to be soloed or not. Must be used in conjuction with the track flag.
-mute(-m) boolean queryedit
This flag specifies whether clips on a track are to be muted or not. Must be used in conjuction with the track flag.
-track(-t) uint createquery
Specify the track to operate on. For example, which track to place a clip on, which track to mute/lock/solo. In query mode, it may be used in conjuction with the clipIndex flag to return the track number of a clip, where track 1 is the first track of the character.

In query mode, this flag can accept a value.

-insertTrack(-it) uint create
This flag is used to insert a new empty track at the track index specified.
-removeTrack(-rt) uint create
This flag is used to remove the track with the specified index. The track must have no clips on it before it can be removed.
-removeEmptyTracks(-ret) create
This flag is used to remove all tracks that have no clips.
-shiftIndex(-shi) uint createmultiuse
This flag allows multiple clips to be shifted by a certain number of tracks and works in conjunction with the shiftAmount flag. The flag specifies the index of the clip to shift. This flag can be used multiple times on the command line to specify a number of clips to shift.
-shift(-sh) int create
This flag allows multiple clips to be shifted by a certain number of tracks and works in conjunction with the shiftIndex flag. The flag specifies the number of tracks to shift the associated clips. Positive values shift the clips down an negative values shift the clips up.
-listPairs(-lp) query
This query only flag returns a string array containing the channels in a character that are used by a clip and the names of the animation curves that drive the channels. Each string in the string array consists of the name of a channel, a space, and the name of the animation curve animating that channel. This flag must be used with the ci/clipIndex flag.
-cycle(-c) float createquery
This flag is now obsolete. Use the postCycle flag instead.
-group(-grp) boolean create
This flag is used to add (true) or remove (false) a list of clips (specified with groupIndex) into a group.
-groupName(-gn) string createquery
This flag is used to specify the group that should be added to. If no group by that name exists and new group is created with that name. By default if this is not specified a new group will be created.
-groupIndex(-gri) uint createmultiuse
This flag specifies a multiple number of clips to be added or removed from a group.

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

// First, create a character to hold the clips. The character will be
// a 3-bone skeleton named "arm".
//
select -d;
joint -p 0 0 0 ;
joint -p 0 4 0 ;
joint -e -zso -oj xyz joint1;
joint -p 0 8 -1 ;
joint -e -zso -oj xyz joint2;
joint -p 0 9 -2 ;
joint -e -zso -oj xyz joint3;
select -r joint1 joint2 joint3;
character -name arm;
// Create some animation for the character. For this example the animation will
// be quite trivial.
//
select -r joint3;
currentTime 0; setKeyframe joint3.rx;
currentTime 10; setKeyframe -v 90 joint3.rx;
currentTime 20; setKeyframe -v 0 joint3.rx;
// Create a clip for the current animation named "handWave"
//
clip -startTime 0 -endTime 20 -name "handWave" "arm";
// Query the name of the clipScheduler for this character
//
character -q -sc "arm";
// Result: armScheduler1
// Create a 2nd animation for the character.
//
select -r joint2;
currentTime 0; setKeyframe "arm";
currentTime 10; setKeyframe -v 45 joint2.rx; setKeyframe -v -20 joint2.ry;
currentTime 20; setKeyframe -v 0 joint2.rx; setKeyframe -v 20 joint2.ry;
// Create a clip for the current animation named "elbowWave"
//
clip -startTime 0 -endTime 20 -name "elbowWave" "arm";
// Instance handeWave at time 10
//
clipSchedule -instance handWave -s 10 "armScheduler1";
// Query the clip index of the latest instance of handWave. Each instance
// of a clip received a unique clipIndex. The clip index is used to
// edit and query data for existing clips.
//
clipSchedule -name handWave1 -q -ci armScheduler1;
// Query whether the clip associated with index 2 is enabled or not
//
clipSchedule -ci 2 -q -enable "armScheduler1";
// Query the name of the clip associated with index 2
//
clipSchedule -ci 2 -q -n "armScheduler1";
// Query the weight of the clip associated with index 2
//
clipSchedule -ci 2 -q -weight "armScheduler1";
// Modify the elbowWave clip to start at frame 10 instead of frame 0
//
clipSchedule -start 10 -ci 1 "armScheduler1";
// Trim the start of the elbowWave clip to
// use the animation starting at frame 5 instead 0
//
clipSchedule -sourceStart 5 -ci 1 "armScheduler1";
// Trim the end of the elbowWave clip to
// use the animation up to frame 15 instead 20
//
clipSchedule -sourceEnd 15 -ci 1 "armScheduler1";
// Modify the handWave clip to have two cycles instead of 1
//
clipSchedule -postCycle 1 -ci 0 "armScheduler1";
// list the animation curves associated with a particular clip
//
clipSchedule -ci 2 -listCurves "armScheduler1";
// Move a particular clip to a particular track
//
clipSchedule -track 2 -ci 0 "armScheduler1";
// Add a blend between clips 1 and 2
//
clipSchedule -b 1 2 "armScheduler1";
// Query the name of the blendNode between clips 1 and 2
//
clipSchedule -bn 1 2 -q "armScheduler1";
// Lock the first track and then query its state
//
clipSchedule -track 1 -e -lock 1 "armScheduler1";
clipSchedule -track 1 -q -lock "armScheduler1";
// Query the existing clips in the scheduler.
// In query mode, returns an array of strings in this form:
// (clipName,index,start,sourceStart,sourceEnd,scale,preCycle,postCycle,hold)
//
// In this case there are three scheduled clips:
//  2 instances of "handWave" and 1 of "elbowWave". The clip indices for "handWave" are 0
//  and 3. The clip index for "elbowWave" is 2. Note that the clip indices can be sparse
//  since a clip maintains its index as long as it is in the schedule (the TraX editor).
//
clipSchedule -q "armScheduler1";
// Result: handWave,0,0.000000,0.000000,20.000000,1.000000,0.00000,2.00000 elbowWave,1,0.000000,5.000000,15.000000,1.000000,0.00000,1.00000 handWave,2,10.000000,0.000000,20.000000,1.000000,0.00000,1.00000
//
// Shift clips 1 and 2 up 3 tracks
//
clipSchedule -sh -3 -shi 1 -shi 2 "armScheduler1";
// Print out which anim curves animate which channels for the
// clip with an index of 2.
//
string $out[] = `clipSchedule -ci 2 -q -lp "armScheduler1"`;
string $pair;
for ($pair in $out) {
	string $buff[];
	tokenize $pair " " $buff;
	print ($buff[1] + " animates " + $buff[0] + ".\n");
}