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

Synopsis

timeEditorClip([absolute=boolean], [addAttribute=string], [addObjects=string], [addRelatedKG=boolean], [addSelectedObjects=boolean], [allowShrinking=boolean], [animSource=string], [attribute=string], [audio=string], [blendMode=int], [children=int], [clipAfter=boolean], [clipBefore=boolean], [clipDataType=boolean], [clipId=int], [clipIdFromNodeName=int], [clipIdFromPath=boolean], [clipNode=boolean], [clipPath=boolean], [copyClip=boolean], [crossfadeMode=int], [crossfadePlug=boolean], [curveTime=time], [defaultGhostRoot=boolean], [drivenAttributes=boolean], [drivenClipsBySource=string], [drivenObjects=boolean], [drivenRootObjects=boolean], [drivingSources=string], [duplicateClip=boolean], [duration=time], [emptySource=boolean], [endTime=time], [exclusive=boolean], [existingOnly=boolean], [exists=boolean], [explode=int], [exportAllClips=boolean], [exportFbx=string], [extend=boolean], [extendParent=boolean], [ghost=boolean], [ghostRootAdd=string], [ghostRootRemove=string], [group=boolean], [holdEnd=time], [holdStart=time], [importAllFbxTakes=boolean], [importFbx=string], [importFbxTakes=string], [importMayaFile=string], [importOption=string], [importPopulateOption=string], [importTakeDestination=int], [importedContainerNames=string], [includeRoot=boolean], [isContainer=boolean], [listUserGhostRoot=boolean], [loopEnd=time], [loopStart=time], [minClipDuration=boolean], [modifyAnimSource=boolean], [moveClip=time], [mute=boolean], [name=string], [parent=int], [parentClipId=int], [parentGroupId=boolean], [pasteClip=time], [path=string], [populateImportedAnimSources=string], [poseClip=boolean], [preserveAnimationTiming=boolean], [razorClip=time], [recursively=boolean], [remap=[string, string]], [remapNamespace=[string, string]], [remapSource=[string, string]], [remappedSourceAttrs=boolean], [remappedTargetAttrs=boolean], [removeAttribute=string], [removeClip=boolean], [removeCrossfade=boolean], [removeSceneAnimation=boolean], [removeWeightCurve=boolean], [resetTiming=boolean], [resetTransition=boolean], [ripple=boolean], [rootClipId=int], [rootPath=string], [scaleEnd=time], [scalePivot=time], [scaleStart=time], [setKeyframe=string], [showAnimSourceRemapping=boolean], [speedRamping=int], [startTime=time], [takeList=string], [takesToImport=string], [timeWarp=boolean], [timeWarpCurve=boolean], [timeWarpType=int], [track=string], [tracksNode=boolean], [transition=boolean], [trimEnd=time], [trimStart=time], [truncated=boolean], [type=string], [uniqueAnimSource=boolean], [userGhostRoot=boolean], [weightCurve=boolean], [zeroKeying=boolean])

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

timeEditorClip is undoable, queryable, and editable.

This command edits/queries Time Editor clips.

Return value

stringReturn created clip's name.

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

Keywords

timeEditor, nle

Related

timeEditor, timeEditorAnimSource, timeEditorComposition, timeEditorTracks

Flags

absolute, addAttribute, addObjects, addRelatedKG, addSelectedObjects, allowShrinking, animSource, attribute, audio, blendMode, children, clipAfter, clipBefore, clipDataType, clipId, clipIdFromNodeName, clipIdFromPath, clipNode, clipPath, copyClip, crossfadeMode, crossfadePlug, curveTime, defaultGhostRoot, drivenAttributes, drivenClipsBySource, drivenObjects, drivenRootObjects, drivingSources, duplicateClip, duration, emptySource, endTime, exclusive, existingOnly, exists, explode, exportAllClips, exportFbx, extend, extendParent, ghost, ghostRootAdd, ghostRootRemove, group, holdEnd, holdStart, importAllFbxTakes, importFbx, importFbxTakes, importMayaFile, importOption, importPopulateOption, importTakeDestination, importedContainerNames, includeRoot, isContainer, listUserGhostRoot, loopEnd, loopStart, minClipDuration, modifyAnimSource, moveClip, mute, name, parent, parentClipId, parentGroupId, pasteClip, path, populateImportedAnimSources, poseClip, preserveAnimationTiming, razorClip, recursively, remap, remapNamespace, remapSource, remappedSourceAttrs, remappedTargetAttrs, removeAttribute, removeClip, removeCrossfade, removeSceneAnimation, removeWeightCurve, resetTiming, resetTransition, ripple, rootClipId, rootPath, scaleEnd, scalePivot, scaleStart, setKeyframe, showAnimSourceRemapping, speedRamping, startTime, takeList, takesToImport, timeWarp, timeWarpCurve, timeWarpType, track, tracksNode, transition, trimEnd, trimStart, truncated, type, uniqueAnimSource, userGhostRoot, weightCurve, zeroKeying
Long name (short name) Argument types Properties
absolute(abs) boolean query
This flag is used in conjunction with other timing flags like -s/start, -d/duration, -ed/end, etc. to query (global) absolute time.
addAttribute(aa) string editmultiuse
Add new attribute to the clip.
allowShrinking(eas) boolean edit
When extending clip, allow shrinking.
animSource(asr) string createqueryedit
Populate based on animation source.
audio(au) string create
Create a clip with audio inside.
blendMode(bm) int queryedit
Set the blending mode for the clips specified with the -clipId flags:
  • 0 : normal - absolute blend
  • 1 : additive - relative blend
children(chl) int query
Get children clip IDs.
clipAfter(ca) boolean query
Get the clip ID of the next clip.
clipBefore(cb) boolean query
Get the clip ID of the previous clip.
clipDataType(cdt) boolean query
Query the type of data being driven by the given clip ID. Return values are:
  • 0 : Animation - Clip drives animation curves
  • 1 : Audio - Clip drives audio
  • 3 : Group - Clip is a group
clipId(id) int createeditmultiuse
ID of the clip to be edited.
clipIdFromNodeName(idn) int query
Get clip ID from clip node name.
clipIdFromPath(idp) boolean query
Flag for querying the clip ID given the path. Clip path is a vertical-bar-delimited string to indicate a hierarchical structure of a clip. Please refer to the hierarchical path in outliner to see how it is represented. For example: composition1|track1|clip1 Note: To specify the path, this flag must appear before -query flag.
clipNode(cln) boolean query
Flag for querying the name of the clip node.
clipPath(clp) boolean query
Flag for querying the path given the clip ID. Clip path is a vertical bar delimited string to indicate a hierarchical structure of a clip. Please refer to the hierarchical path in outliner to see how it is represented. For example: composition1|track1|clip1. Note: If the clip is not connected to any track, it will return empty string.
copyClip(ccl) boolean edit
Get the selected clip IDs and store them in a list that could be used for pasting.
crossfadeMode(cfm) int queryedit
Set the crossfading mode between two clips that lie on the same track, and that are specified with the -clipId flags:
  • 0 : linear - Two clips are blended with a constant ratio
  • 1 : step - Left clip keeps its value until the middle of the crossfading region and then right clip's value is used
  • 2 : hold left - Use only left clip's value
  • 3 : hold right - Use only right clip's value
  • 4 : custom - User defined crossfade curve
  • 5 : custom (spline) - User defined crossfade curve with spline preset
crossfadePlug(cfp) boolean query
Get plug path for a custom crossfade curve between 2 clips.
curveTime(cvt) time query
Query the curve local time in relation to the given clip.
defaultGhostRoot(dgr) boolean queryedit
Edit or query default ghost root variable. Determine whether to use the default ghost root (object driven by clip).
drivenAttributes(dat) boolean query
Return a list of attributes driven by a clip.
drivenClipsBySource(dcs) string query
Returns the clips driven by the given source. Can filter the return result by the specified type, like animCurve, expression, constraint, etc. This flag must come before the -query flag.
drivenObjects(dos) boolean query
Return an array of strings consisting of the names of all objects driven by the current clip and its children clips.
drivenRootObjects(dro) boolean query
Return an array of strings consisting of the names of all root objects driven by this clip and its children clips.
drivingSources(dsc) string query
Return all sources driving the given clip. Can filter the return result by the specified type, like animCurve, expression, constraint, etc. If used after the -query flag (without an argument), the command returns all sources driving the given clip. To specify the type, this flag must appear before the -query flag.

In query mode, this flag can accept a value.

duplicateClip(dcl) boolean edit
Duplicate clip into two clips with the same timing info.
duration(d) time createquery
Relative duration of the new clip.
emptySource(ems) boolean create
Create a clip with an empty source.
endTime(et) time query
Query the relative end time of the clip.
existingOnly(exo) boolean edit
This flag can only be used in edit mode, in conjunction with the animSource flag. Retain the animSource flag functionality but only bind attributes that are already part of the clip. It does not attempt to populate unbound source attributes to their default destination.
exists(exs) boolean query
Return true if the specified clip exists.
explode(epl) int edit
Reparent all tracks and their clips within a group out to its parent track node and remove the group.
exportAllClips(eac) boolean edit
When used with the ef/exportFbx flag, export all clips.
exportFbx(ef) string edit
Export currently selected clips to FBX files.
extend(ex) boolean edit
Extend the clip to encompass all children.
extendParent(exp) boolean edit
Extend parent to fit this clip.
ghost(gh) boolean queryedit
Enable/disable ghosting for the specified clip.
ghostRootAdd(gra) string editmultiuse
Add path to specified node as a custom ghost root.
ghostRootRemove(grr) string editmultiuse
Remove path to specified node as a custom ghost root.
group(grp) boolean create
Specify if the new container should be created as a group, containing other specified clips.
holdEnd(he) time queryedit
Hold clip's end to time.
holdStart(hs) time queryedit
Hold clip's start to time.
importTakeDestination(itd) int create
Specify how to organize imported FBX takes: 0 - Import takes into a group (default) 1 - Import takes into multiple compositions 2 - Import takes as a sequence of clips
isContainer(ict) boolean query
Indicate if given clip ID is a container.
listUserGhostRoot(lug) boolean query
Get user defined ghost root object for indicated clips.
loopEnd(le) time queryedit
Loop clip's end to time.
loopStart(ls) time queryedit
Loop clip's start to time.
minClipDuration(mcd) boolean query
Returns the minimum allowed clip duration.
modifyAnimSource(mas) boolean createedit
When populating, automatically modify Anim Source without asking the user.
moveClip(mcl) time edit
Move clip by adding delta to its start time.
mute(m) boolean queryedit
Mute/Unmute the clip given a clip ID. In query mode, return the muted state of the clip. Clips muted by soloing are not affected by this flag.
name(n) string queryedit
Name of the clip. A clip will never have an empty name. If an empty string is provided, it will be replaced with "_".
parent(p) int edit
Specify group/object parent ID.
parentClipId(pid) int createquery
Specify the parent clip ID of a clip to be created.
parentGroupId(pgd) boolean query
Return the parent group ID of the given clip.
pasteClip(pcl) time edit
Paste clip to the given time and track. Destination track is required to be specified through the track flag in the format "tracksNode:trackIndex". A trackIndex of -1 indicates that a new track will be created.
path(pt) string editmultiuse
Full path of the clip to be edited. For example: composition1|track1|clip1.

In query mode, this flag can accept a value.

preserveAnimationTiming(pat) boolean create
When used with the population command, it ensures the animation is offset within a clip in such way that it matches its original scene timing, regardless of the new clip's position.
razorClip(rcl) time edit
Razor clip into two clips at the specified time.
remap(rmp) [string, string] edit
Change animation source for a given clip item to a new one, specified by the target path. This removes all clips for the roster item and creates new clips from the Anim Source for the new target path.
remapNamespace(rns) [string, string] createmultiuse
Remap namespace(s). Can only be used in create mode, in conjunction with the -importFbx/fbx, -importMayaFile/mf, or -attribute/at flags. This flag will replace any occurrences of a given namespace to an alternate specified namespace. It takes in two string arguments. The first argument specifies the namespace to replace. The second argument specifies the replacement namespace. This flag cannot be used in conjunction with the -sar/showAnimSourceRemapping flag. Note that a track must be specified, and must exist prior to invoking the timeEditorClip command with the -remapNamespace flag.
remapSource(rs) [string, string] edit
Set animation source to be remapped for a given clip item to new one, specified by the target path.
remappedSourceAttrs(rms) boolean query
Return an array of attribute indices and names of the source attributes of a remapped clip.
remappedTargetAttrs(rmt) boolean query
Return an array of attribute indices and names of the target attributes of a remapped clip.
removeAttribute(ra) string editmultiuse
Remove attribute from the clip.
removeClip(rmc) boolean edit
Remove clip of specified ID.
removeCrossfade(rcf) boolean edit
Remove custom crossfade between two clips specified by -clipId flags.
removeWeightCurve(rwc) boolean createqueryedit
Remove the weight curve connected to the clip.
resetTiming(rt) boolean edit
Reset start and duration of a clip with the given clip ID to the values stored in its Anim Source.
resetTransition(rtr) boolean edit
Reset transition intervals between specified clips.
ripple(rpl) boolean edit
Apply rippling to a clip operation.
rootClipId(rti) int edit
ID of the root clip. It is used together with various clip editing flags. When used, the effect of clip editing and its parameters will be affected by the given root clip. For example, moving a clip under the group root (usually in group tab view) will be performed in the local time space of the group root.
rootPath(rpt) string edit
Path of the root clip. It is used together with various clip editing flags. When used, the effect of clip editing and its parameters will be affected by the given root clip. For example, moving a clip under the group root (usually in group tab view) will be performed in the local time space of the group root.
scaleEnd(sce) time edit
Scale the end time of the clip to the given time.
scalePivot(scp) time edit
Scale the time of the clip based on the pivot. This should be used together with -scs/scaleStart or -sce/scaleEnd.
scaleStart(scs) time edit
Scale the start time of the clip to the given time.
setKeyframe(k) string editmultiuse
Set keyframe on a specific clip for a specified attribute.
speedRamping(src) int queryedit
To control the playback speed of the clip by animation curve:
  • 1 : create - Attach a speed curve and a time warp curve to the clip to control the playback speed
  • 2 : edit - Open the Graph editor to edit the speed curve
  • 3 : enable - Create a time warp curve from current speed curve and attach to clip
  • 4 : disable - Remove the time warp curve from clip
  • 5 : delete - Delete the attached speed curve and time warp curve
  • 6 : reset - Reset the speed curve back to the default
  • 7 : convert to speed curve from time warp
  • 8 : convert to time warp from speed curve
In query mode, return true if a speed curve is attached to the clip.
startTime(s) time createquery
Relative start time of the new clip.
timeWarp(tw) boolean query
Return true if the clip is being warped by the speed curve. If no speed curve is attached to the clip, it will always return false.
timeWarpCurve(twc) boolean query
Returns the name of the time warp curve connected to the clip.
timeWarpType(twt) int queryedit
Time warp mode:
  • 0: remapping - Connected time warp curve performs frame by frame remapping
  • 1: speed curve - Connected time warp curve acts as a speed curve
In query mode, return time warp mode of a clip.
track(trk) string createqueryedit
The new clip container will be created on the track in the format "trackNode:trackNumber", or on a track path, for example "composition1|track1". In query mode, return a string containing the track number and tracks node of the given clip ID. In create mode, if the track number is '-1' or not given at all, then a new track will be created. For example: "trackNode:-1"; "composition1|".
tracksNode(trn) boolean query
Get tracks node if specified clip is a group clip.
transition(tra) boolean edit
Create transition intervals between specified clips.
trimEnd(tre) time edit
Trim the end time of the clip to the given time.
trimStart(trs) time edit
Trim the start time of the clip to the given time.
truncated(trc) boolean query
This flag is used in conjunction with other timing flags like -s/start, -d/duration, -ed/end, etc. to query (global) truncated time.
uniqueAnimSource(uas) boolean edit
If a given clip is sharing its Anim Source node with another clip, make the Anim Source of this clip unique.
userGhostRoot(ugr) boolean queryedit
Edit or query custom ghost root variable. Determine whether to use user defined ghost root.
weightCurve(wc) boolean createqueryedit
In edit mode, create a weight curve and connect it to the clip. In query mode, return the name of the weight curve connected to the clip.
zeroKeying(zk) boolean edit
A toggle flag to use in conjunction with k/setKeyframe, set the value of the key frame(s) to be keyed to zero.
addObjects(ao) string createqueryedit
Populate the given object(s) and their attributes to anim source to Time Editor. For multiple object, pass each name separated by semicolon. In query mode, return the number of attributes that will be populated given the flags, along with the animation's first and last frames for the given object(s). Similar to -addSelectedObjects flag but acts on given object(s) instead. This flag will override the flag -addSelectedObjects.
addRelatedKG(akg) boolean createqueryedit
During population, determine if associated keying groups should be populated or not. Normally used for populating HIK. By default the value is false.
addSelectedObjects(aso) boolean createqueryedit
Populate the currently selected objects and their attributes to anim source or Time Editor. In query mode, return the number of attributes that will be populated given the flags, along with the animation's first and last frames.
attribute(at) string createeditmultiuse
Populate a specific attribute on a object.
exclusive(exc) boolean createedit
Populate all types of animation sources which are not listed by "type" Flag.
importAllFbxTakes(aft) boolean create
Import all FBX takes into the new anim sources (for timeEditorAnimSource command) or new containers (for timeEditorClip command).
importFbx(fbx) string create
Import an animation from FBX file into the new anim source (for timeEditorAnimSource command) or new container (for timeEditorClip command).
importFbxTakes(ft) string create
Import multiple FBX takes (separated by semicolons) into the new anim sources (for timeEditorAnimSource command) or new containers (for timeEditorClip command).
importMayaFile(mf) string create
Import an animation from Maya file into the new anim sources (for timeEditorAnimSource command) or new containers (for timeEditorClip command).
importOption(io) string edit
Option for importing animation source. Specify either 'connect' or 'generate'. connect: Only connect with nodes already existing in the scene. Importing an animation source that does not match with any element of the current scene will not create any clip. (connect is the default mode). generate: Import everything and generate new nodes for items not existing in the scene.
importPopulateOption(ipo) string edit
Option for population when importing.
importedContainerNames(icn) string create
Internal use only. To be used along with populateImportedAnimSources to specify names for the created containers.
includeRoot(irt) boolean createedit
Populate transform (Translate, Rotate, Scale) of hierarchy root nodes.
populateImportedAnimSources(pia) string create
Internal use only. Populate the Time Editor with clips using the Animation Sources specified (use ; as a delimiter for multiple anim sources).
poseClip(poc) boolean create
Populate as pose clip with current attribute values.
recursively(rec) boolean createedit
Populate selection recursively, adding all the children.
removeSceneAnimation(rsa) boolean createedit
If true, remove animation from scene when creating clips or anim sources. Only Time Editor will drive the removed scene animation.
showAnimSourceRemapping(sar) boolean create
Show a remapping dialog when the imported anim source attributes do not match the scene attributes.
takeList(tl) string create
Internal use only. To be used along with populateImportedAnimSources to specify the imported take names.
takesToImport(toi) string create
Internal use only. To be used along with populateImportedAnimSources to specify the imported take indices.
type(typ) string createqueryeditmultiuse
Only populate the specified type of animation source.

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


# Move clips 1 and 2
cmds.timeEditorClip(edit=True, moveClip=20, clipId=[1,2])

# Create new container clip on track 4 of Container_A tracks
cmds.timeEditorClip("ClipNodeName", track="Container_A_Tracks:4")

# Create new container clip on track path
cmds.timeEditorClip("ClipNodeName", track="composition1|track1")

# Populate selected objects with attributes driven by specific types of animation sources
cmds.timeEditorClip("teClip1", addSelectedObjects=True, type=["animCurveTL","animCurveTA"], track="Composition1:1")

# Populate selected objects and their associated keying groups (normally used for populating complete HIK rig)
cmds.timeEditorClip("teClip1", addSelectedObjects=True, addRelatedKG=True, track="Composition1:1")

# Populate selected objects into a newly created container
cmds.timeEditorClip("ContainerName", track="Container_A_Tracks:0", addSelectedObjects=True)

# Move a container(s) to a different track
# The "New_Track:2" has the same format as when creating a new clip,
# where "New_Track" is the TimeEditor "Tracks node" and "2" is the track index in that node.
# A "Tracks" node maintains a list of tracks at a given level in the TimeEditor hierarchy
# and is either a composition or a group clip.
cmds.timeEditorClip(edit=True, track="New_Track:2", clipId=[1,2,3])

# Move a container(s) to a different track by clip path
cmds.timeEditorClip(edit=True, track="composition1|track1", path=["composition1|track2|clip1","composition1|track2|clip2","composition1|track2|clip3"])

# Create a group from specified containers
cmds.timeEditorClip("GroupName", track="New_Track:1", group=True, clipId=[1,2,3])

# Import animation from selected object into the TimeEditor.
cmds.timeEditorClip("container_A", aso=True, track="composition1|track1")

# Return the Anim Source for a given clip ID 1
cmds.timeEditorClip(1, query=True, animSource=True)

# Create a clip from an Anim Source starting at frame 30 into track2 of composition1
cmds.timeEditorClip("Container_B", track="composition1|track2", animSource="someAnimSourceName", startTime=30)

# Return the start time of the clip with clip ID 1
cmds.timeEditorClip(1, query=True, startTime=True, absolute=True)

# Return the duration of the clip with clip ID 1
cmds.timeEditorClip(1, query=True, duration=True, absolute=True)

# Remap cube 1 translate X attribute to cube 1 translate Y attribute
cmds.timeEditorClip(edit=True, remapSource=["cube1.translateY", "cube1.translateX"], clipId=1)
cmds.timeEditorClip(edit=True, animSource="AnimSourceName", clipId=1)

# Setup the crossfading mode between 2 clips to linear
cmds.timeEditorClip(edit=True, crossfadeMode=-1, clipId=[1,2])

# Remove clips with clip ID 1 and 2.
cmds.timeEditorClip(edit=True, removeClip=True, clipId=[1,2])