pymel.core.animation.animLayer

animLayer(*args, **kwargs)

This command creates and edits animation layers.

Modifications:
  • returns a PyNode object for flags: (query and (root or bestLayer or parent))
  • returns a list of PyNode objects for flags: (query and (children or attribute or bestAnimLayer or animCurves or baseAnimCurves or blendNodes or affectedLayers or parent))
Flags:
Long name (short name) Argument Types Properties
addRelatedKG (akg) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Used adding attributes to a layer. Determines if associated keying groups should be added or not to the layer.
addSelectedObjects (aso) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Adds selected object(s) to the layer.
affectedLayers (afl) bool ../../../_images/query.gif
 
Return the layers that the currently selected object(s) are members of
animCurves (anc) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
In query mode returns the anim curves associated with this layer
attribute (at) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Adds a specific attribute on a object to the layer.
baseAnimCurves (bac) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
In query mode returns the base layer anim curves associated with this layer, if any.
bestAnimLayer (blr) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

In query mode returns the best anim layers for keying for the selected objects. If used in conjunction with -at, will return the best anim layers for keying for the specific plugs (attributes) specified.

bestLayer (bl) bool ../../../_images/query.gif
 
Return the layer that will be keyed for specified attribute.
blendNodes (bld) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
In query mode returns the blend nodes associated with this layer
children (c) unicode ../../../_images/query.gif
 
Get the list of children layers. return value is a string array.
collapse (col) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Determine if a layer is collapse in the layer editor.
copy (cp) unicode ../../../_images/edit.gif
 
Copy from layer.
copyAnimation (ca) unicode ../../../_images/create.gif ../../../_images/edit.gif
 
copy animation from specified layer to destination layer, only animation that are on attribute layered by both layer that are concerned.
copyNoAnimation (cna) unicode ../../../_images/edit.gif
 
Copy from layer without the animation curves.
excludeBoolean (ebl) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, excludes any boolean attributes.
excludeDynamic (edn) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, excludes any dynamic attributes.
excludeEnum (een) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, excludes any enum attributes.
excludeRotate (ert) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, exclude the rotate attribute.
excludeScale (esc) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, exclude the scale attribute.
excludeTranslate (etr) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, excludes the translate attribute.
excludeVisibility (evs) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
When adding selected object(s) to the layer, exclude the visibility attribute.
exists (ex) bool ../../../_images/query.gif
 
Determine if an layer exists.
extractAnimation (ea) unicode ../../../_images/create.gif ../../../_images/edit.gif
 
transfer animation from specified layer to destination layer, only animation that are on attribute layered by both layer that are concerned.
findCurveForPlug (fcv) unicode ../../../_images/edit.gif
 

finds the parameter curve containing the animation data for the specified plug on the given layer.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

forceUIRebuild (fur) bool ../../../_images/create.gif
 
rebuilds the animation layers user interface.
forceUIRefresh (uir) bool ../../../_images/create.gif
 
refreshes the animation layers user interface.
layeredPlug (lp) unicode ../../../_images/query.gif
 
returns the plug on the blend node corresponding to the specified layer
lock (l) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the lock state of the specified layer. A locked layer can not receive key. Default is false.
moveLayerAfter (mva) unicode ../../../_images/edit.gif
 
Move layer after the specified layer
moveLayerBefore (mvb) unicode ../../../_images/edit.gif
 
Move layer before the specified layer
mute (m) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the mute state of the specified layer. Default is false.
override (o) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the overide state of the specified layer. Default is false.
parent (p) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the parent of the specified layer. Default is the animation layer root.
passthrough (pth) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the passthrough state of the specified layer. Default is true.
preferred (prf) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Determine if a layer is a preferred layer, the best layer algorithm will try to set keyframe in preferred layer first.
removeAllAttributes (raa) bool ../../../_images/edit.gif
 
Remove all objects from layer.
removeAttribute (ra) unicode ../../../_images/edit.gif
 
Remove object from layer.
root (r) unicode ../../../_images/query.gif
 
Return the base layer if it exist
selected (sel) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Determine if a layer is selected, a selected layer will be show in the timecontrol, graph editor.
solo (s) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the solo state of the specified layer. Default is false.
weight (w) float ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Set the weight of the specified layer between 0.0 and 1.0. Default is 1.
writeBlendnodeDestinations (wbd) bool ../../../_images/edit.gif
 

In edit mode writes the destination plugs of the blend nodes that belong to the layer into the blend node. This is used for layer import/export purposes and is not for general use.

Derived from mel command maya.cmds.animLayer

Example:

import pymel.core as pm

pm.animLayer("layer1", mute=True, solo=True, override=True, passthrough=False, lock=True)
# Result: nt.AnimLayer(u'layer1') #
pm.animLayer("layer1", query=True, mute=True)
# Result: True #
pm.animLayer("layer1", query=True, solo=True)
# Result: True #
pm.animLayer("layer1", query=True, override=True)
# Result: True #
pm.animLayer("layer1", query=True, passthrough=True)
# Result: False #
pm.animLayer("layer1", query=True, lock=True)
# Result: True #
pm.animLayer("layer1", query=True, parent=True)
# Result: nt.AnimLayer(u'BaseAnimation') #

Previous topic

pymel.core.animation.animDisplay

Next topic

pymel.core.animation.animView

Core

Core Modules

Other Modules

This Page