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

Synopsis

timeEditorAnimSource([addObjects=string], [addRelatedKG=boolean], [addSelectedObjects=boolean], [addSource=string], [apply=boolean], [attribute=string], [bakeToAnimSource=string], [calculateTiming=boolean], [copyAnimation=boolean], [drivenClips=boolean], [exclusive=boolean], [export=string], [importAllFbxTakes=boolean], [importFbx=string], [importFbxTakes=string], [importMayaFile=string], [importOption=string], [importPopulateOption=string], [importedContainerNames=string], [includeRoot=boolean], [isUnique=boolean], [populateImportedAnimSources=string], [poseClip=boolean], [recursively=boolean], [removeSceneAnimation=boolean], [removeSource=string], [showAnimSourceRemapping=boolean], [takeList=string], [takesToImport=string], [targetIndex=string], [targets=boolean], [type=string])

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

timeEditorAnimSource is undoable, queryable, and editable.

Commands for managing animation sources.

Return value

stringCommand result

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

Keywords

timeEditor, nle

Related

timeEditor, timeEditorClip, timeEditorComposition, timeEditorTracks

Flags

addObjects, addRelatedKG, addSelectedObjects, addSource, apply, attribute, bakeToAnimSource, calculateTiming, copyAnimation, drivenClips, exclusive, export, importAllFbxTakes, importFbx, importFbxTakes, importMayaFile, importOption, importPopulateOption, importedContainerNames, includeRoot, isUnique, populateImportedAnimSources, poseClip, recursively, removeSceneAnimation, removeSource, showAnimSourceRemapping, takeList, takesToImport, targetIndex, targets, type
Long name (short name) Argument types Properties
addSource(asc) string edit
Add single new target attribute with its animation.
apply(ap) boolean edit
Connect anim source's animation directly to the target objects. If the Time Editor is not muted, connect to scene storage instead.
bakeToAnimSource(bas) string edit
Create a new anim source with the same animation as this anim source. All non-curve inputs will be baked down, whereas curve sources will be shared.
calculateTiming(ct) boolean queryedit
Adjust start/duration when adding/removing sources. If query it returns the [start,duration] pair.
copyAnimation(cp) boolean edit
Copy animation when adding source.
drivenClips(dc) boolean query
Return all clips driven by the given anim source.
export(ex) string edit
Export given anim source and the animation curves to a specified Maya file.
isUnique(iu) boolean query
Return true if the anim source node is only driving a single clip.
removeSource(rs) string edit
Remove single attribute.
targetIndex(ti) string query
Get target index.
targets(trg) boolean query
Get a list of all targets in this anim source.
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


import maya.cmds as cmds
def setKey(time, value):
    cmds.currentTime(time)
    cmds.setAttr('cube.tx', value)
    cmds.setKeyframe('cube.tx')

cmds.file(f=True, new=True)
cmds.polyCube(name='cube')
setKey( 1,  0)
setKey( 5, -5)
setKey(10,  5)

# Add cube.translateX with its animation to the anim source and calculate and save timing afterwards
cmds.timeEditorAnimSource("AnimSourceNode", edit=1, addSource="cube.translateX", calculateTiming=1)

# Add cube.translateX with a copy of its animation to the anim source
cmds.timeEditorAnimSource("AnimSourceNode", edit=1, addSource="cube.translateX", copyAnimation=1)

# Remove cube.translateX from the anim source
cmds.timeEditorAnimSource("AnimSourceNode", edit=1, removeSource="cube.translateX")