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

Synopsis

clip [-absolute boolean] [-absoluteRotations boolean] [-active string] [-addTrack] [-allAbsolute] [-allClips] [-allRelative] [-allSourceClips] [-animCurveRange] [-character] [-constraint] [-copy] [-defaultAbsolute] [-duplicate] [-endTime time] [-expression] [-ignoreSubcharacters] [-isolate] [-leaveOriginal] [-mapMethod string] [-name string] [-newName string] [-paste] [-pasteInstance] [-remove] [-removeTrack] [-rotationOffset float float float] [-rotationsAbsolute] [-scheduleClip boolean] [-sourceClipName] [-split time] [-startTime time] [-translationOffset float float float] [-useChannel string]

clip is undoable, queryable, and editable.

This command is used to create, edit and query character clips.

Return value

string[]clip names

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

Keywords

character, clip, animation

Related

bakeClip, character, characterMap, clipEditor, clipSchedule, pose

Flags

absolute, absoluteRotations, active, addTrack, allAbsolute, allClips, allRelative, allSourceClips, animCurveRange, character, constraint, copy, defaultAbsolute, duplicate, endTime, expression, ignoreSubcharacters, isolate, leaveOriginal, mapMethod, name, newName, paste, pasteInstance, remove, removeTrack, rotationOffset, rotationsAbsolute, scheduleClip, sourceClipName, split, startTime, translationOffset, useChannel
Long name (short name) Argument types Properties
-startTime(-s) time createqueryedit
Specify the clip start
-endTime(-end) time createqueryedit
Specify the clip end
-name(-n) string createquerymultiuse
In create mode, specify the clip name. In query mode, return a list of all the clips. In duplicate mode, specify the clip to be duplicated. In copy mode, specify the clip to be copied. This flag is multi-use, but multiple use is only supported with the copy flag. For use during create and with all other flags, only the first instance of the name flag will be utilized.

In query mode, this flag can accept a value.

-newName(-nn) string create
Rename a clip. Must be used in conjunction with the clip name flag, which is used to specify the clip to be renamed.
-active(-a) string queryedit
Query or edit the active clip. This flag is not valid in create mode. Making a clip active causes its animCurves to be hooked directly to the character attributes in addition to being attached to the clip library node. This makes it easier to access the animCurves if you want to edit, delete or add additional animCruves to the clip.
-animCurveRange(-acr) create
This flag can be used at the time you create the clip instead of the startTime and endTime flags. It specifies that you want the range of the clip to span the range of keys in the clips associated animCurves.
-absolute(-abs) boolean create
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. Default is true.
-absoluteRotations(-abr) boolean create
This flag is now deprecated. Use aa/allAbsolute, ar/allRelative, ra/rotationsAbsolute, or da/defaultAbsolute instead. If true, this overrides the -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) create
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) create
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) create
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) create
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.
-remove(-rm) query
Remove the clip specified by the name flag. The clip will be permanently removed from the library and deleted from any times where it has been scheduled.
-duplicate(-d) query
Duplicate the clip specified by the name flag. The start time of the new clip should be specified with the startTime flag.
-scheduleClip(-sc) boolean create
This flag is used when creating a clip to specify whether or not the clip should immediately be scheduled at the current time. If the clip is not scheduled, the clip will be placed in the library for future use, but will not be placed on the timeline. This flag is for use only when creating a new clip or duplicating an existing. The default is true.
-leaveOriginal(-lo) create
This flag is used when creating a clip to specify that the animation curves should be copied to the clip library, and left on the character.
-copy(-c) createquery
This flag is used to copy a clip or clips to the clipboard. It should be used in conjunction with the name flag to copy the named clips on the specified character and its subcharacters. In query mode, this flag allows you to query what, if anything, has been copied into the clip clipboard.
-paste(-p) create
This flag is used to paste a clip or clips from the clipboard to a character. Clips are added to the clipboard using the c/copy flag.
-pasteInstance(-pi) create
This flag is used to paste an instance of a clip or clips from the clipboard to a character. Unlike the p/paste flag, which duplicates the animCurves from the original source clip, the pi/pasteInstance flag shares the animCurves from the source clip.
-split(-sp) time createedit
Split an existing clip into two clips. The split occurs around the specified time.
-mapMethod(-mm) string create
This is is valid with the paste and pasteInstance flags only. It specifies how the mapping should be done. Valid options are: "byNodeName", "byAttrName", "byCharacterMap", "byAttrOrder", "byMapOrAttrName" and "byMapOrNodeName". "byAttrName" is the default. The flags mean the following: "byAttrOrder" maps using the order that the character stores the attributes internally, "byAttrName" uses the attribute name to find a correspondence, "byNodeName" uses the node name *and* the attribute name to find a correspondence, "byCharacterMap" uses the existing characterMap node to do the mapping. "byMapOrAttrName" uses a character map if one exists, otherwise uses the attribute name. "byMapOrNodeName" uses a character map if one exists, otherwise uses the attribute name.
-isolate(-i) create
This flag should be used in conjunction with the name flag to specify that a clip or clips should be copied to a new clip library. The most common use of this flag is for export, when you want to only export certain clips from the character, without exporting all of the clips.
-sourceClipName(-scn) query
This flag is for query only. It returns the name of the source clip that controls an instanced clip.
-allClips(-ac) query
This flag is used to query all the clips in the scene. Nodes of type "animClip" that are storing poses, are not returned by this command.
-allSourceClips(-asc) query
This flag is used to query all the source clips in the scene. Nodes of type "animClip" that are storing poses or clip instances, are not returned by this command.
-addTrack(-at)
This flag is now obsolete. Use the insertTrack flag on the clipSchedule command instead.
-removeTrack(-rt) create
This flag is now obsolete. Use removeTrack flag on the clipSchedule command instead.
-useChannel(-uc) string createmultiuse
Specify which channels should be acted on. This flag is valid only in conjunction with clip creation, and the isolate flag. The specified channels must be members of the character.
-ignoreSubcharacters(-is) create
During clip creation, duplication and isolation, subcharacters are included by default. If you want to create a clip on the top level character only, or you want to duplicate the clip on the top level character without including subCharacters, use the ignoreSubcharacters flag.
-character(-ch) query
This is a query only flag which operates on the specified clip. It returns the names of any characters that a clip is associated with.
-constraint(-cn) create
This creates a clip out of any constraints on the character. The constraint will be moved off of the character and into the clip, so that it is only active for the duration of the clip, and its value can be scaled/offset/cycled according to the clip attributes.
-expression(-ex) create
This creates a clip out of any expressions on the character. The expression will be moved off of the character and into the clip, so that it is only active for the duration of the clip, and its value can be scaled/offset/cycled according to the clip attributes.
-translationOffset(-tof) float float float createquery
Return the channel offsets used to modify the clip's translation.
-rotationOffset(-rof) float float float createquery
Return the channel offsets used to modify the clip's rotation.

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";
// Create a 2nd animation for the character.
//
select -r joint2;
currentTime 0; setKeyframe joint2.rx; setKeyframe -v 20 joint2.ry;
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";
// Query the existing source clips
//
clip -q -n "arm";
// Result: handWaveSource elbowWaveSource //
// Query the active clip. Note that the default clip is always active unless
// another clip has been specified as active. This means that new keyframes
// always go into the default clip unless you make another clip active.
//
clip -q -active "arm";
// Result: default //
// Change the name of a clip from handWaveSource to wiggle on a character named "arm"
//
clip -name "handWaveSource" -newName "wiggle" "arm";
// Duplicate the clip named "elbowWaveSource" on the character named "arm" and
// place the duplicate in the schedule at a start time of 50
//
clip -duplicate -name "elbowWaveSource" -s 50 "arm";
// Duplicate the clip named "wiggle" on the character named "arm" and
// do not place the duplicate in the schedule
//
clip -duplicate -name "wiggle" -sc false "arm";
// Remove the clip from the character altogether. All instances of the clip will be
// removed from the schedule and deleted from the library.
//
clip -rm -name "elbowWaveSource" "arm";
// Make the handWave clip active. This means that any new keyframes get
// placed in the handWave clip, and modifications to existing handWave
// keyframes can be made.
//
clip -edit -active "handWave" "arm";
// Split the clip named "handWave" into two clips at time 10
//
clip -split 10 -name "handWave" "arm";
// Query the startTime of a clip. This is the start frame of the animation
// curve range of the clip, and may differ from the scheduled time of the clip,
// which is accessed using the clipSchedule command.
//
clip -name "handWave" -q -s "arm";