pymel.core.animation.timeEditorAnimSource

timeEditorAnimSource(*args, **kwargs)

Commands for managing animation sources.

Flags:

Long Name / Short Name Argument Types Properties
addObjects / ao unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 -addSelectedObjectsflag but acts on given object(s) instead. This flag will override the flag -addSelectedObjects.
addRelatedKG / akg bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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 bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  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.
addSource / asc unicode ../../../_images/edit.gif
  Add single new target attribute with its animation.
apply / ap bool ../../../_images/edit.gif
  Connect anim source’s animation directly to the target objects. If the Time Editor is not muted, connect to scene storage instead.
attribute / at unicode ../../../_images/create.gif ../../../_images/edit.gif
  Populate a specific attribute on a object.
bakeToAnimSource / bas unicode ../../../_images/edit.gif
  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 bool ../../../_images/query.gif ../../../_images/edit.gif
  Adjust start/duration when adding/removing sources. If query it returns the [start,duration] pair.
copyAnimation / cp bool ../../../_images/edit.gif
  Copy animation when adding source.
drivenClips / dc bool ../../../_images/query.gif
  Return all clips driven by the given anim source.
exclusive / exc bool ../../../_images/create.gif ../../../_images/edit.gif
  Populate all types of animation sources which are not listed by typeFlag.
export / ex unicode ../../../_images/edit.gif
  Export given anim source and the animation curves to a specified Maya file.
importAllFbxTakes / aft bool ../../../_images/create.gif
  Import all FBX takes into the new anim sources (for timeEditorAnimSource command) or new containers (for timeEditorClip command).
importFbx / fbx unicode ../../../_images/create.gif
  Import an animation from FBX file into the new anim source (for timeEditorAnimSource command) or new container (for timeEditorClip command).
importFbxTakes / ft unicode ../../../_images/create.gif
  Import multiple FBX takes (separated by semicolons) into the new anim sources (for timeEditorAnimSource command) or new containers (for timeEditorClip command).
importMayaFile / mf unicode ../../../_images/create.gif
  Import an animation from Maya file into the new anim sources (for timeEditorAnimSource command) or new containers (for timeEditorClip command).
importOption / io unicode ../../../_images/edit.gif
  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 unicode ../../../_images/edit.gif
  Option for population when importing.
importedContainerNames / icn unicode ../../../_images/create.gif
  Internal use only. To be used along with populateImportedAnimSourcesto specify names for the created containers.
includeRoot / irt bool ../../../_images/create.gif ../../../_images/edit.gif
  Populate transform (Translate, Rotate, Scale) of hierarchy root nodes.
isUnique / iu bool ../../../_images/query.gif
  Return true if the anim source node is only driving a single clip.
populateImportedAnimSources / pia unicode ../../../_images/create.gif
  Internal use only. Populate the Time Editor with clips using the Animation Sources specified (use ; as a delimiter for multiple anim sources).
poseClip / poc bool ../../../_images/create.gif
  Populate as pose clip with current attribute values.
recursively / rec bool ../../../_images/create.gif ../../../_images/edit.gif
  Populate selection recursively, adding all the children.
removeSceneAnimation / rsa bool ../../../_images/create.gif ../../../_images/edit.gif
  If true, remove animation from scene when creating clips or anim sources. Only Time Editor will drive the removed scene animation.
removeSource / rs unicode ../../../_images/edit.gif
  Remove single attribute.
showAnimSourceRemapping / sar bool ../../../_images/create.gif
  Show a remapping dialog when the imported anim source attributes do not match the scene attributes.
takeList / tl unicode ../../../_images/create.gif
  Internal use only. To be used along with populateImportedAnimSourcesto specify the imported take names.
takesToImport / toi unicode ../../../_images/create.gif
  Internal use only. To be used along with populateImportedAnimSourcesto specify the imported take indices.
targetIndex / ti unicode ../../../_images/query.gif
  Get target index.
targets / trg bool ../../../_images/query.gif
  Get a list of all targets in this anim source.
type / typ unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
  Only populate the specified type of animation source. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.timeEditorAnimSource

Example:

::

import pymel.core as pm

import maya.cmds as cmds def setKey(time, value):

pm.currentTime(time) pm.setAttr(‘cube.tx’, value) pm.setKeyframe(‘cube.tx’)

pm.file(f=True, new=True) pm.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 pm.timeEditorAnimSource(“AnimSourceNode”, edit=1, addSource=”cube.translateX”, calculateTiming=1)

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

# Remove cube.translateX from the anim source pm.timeEditorAnimSource(“AnimSourceNode”, edit=1, removeSource=”cube.translateX”)