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

Synopsis

animLayer([addRelatedKG=boolean], [addSelectedObjects=boolean], [affectedLayers=boolean], [animCurves=boolean], [attribute=string], [baseAnimCurves=boolean], [bestAnimLayer=boolean], [bestLayer=boolean], [blendNodes=boolean], [children=string], [collapse=boolean], [copy=string], [copyAnimation=string], [copyNoAnimation=string], [excludeBoolean=boolean], [excludeDynamic=boolean], [excludeEnum=boolean], [excludeRotate=boolean], [excludeScale=boolean], [excludeTranslate=boolean], [excludeVisibility=boolean], [exists=boolean], [extractAnimation=string], [findCurveForPlug=string], [forceUIRebuild=boolean], [forceUIRefresh=boolean], [layeredPlug=string], [lock=boolean], [moveLayerAfter=string], [moveLayerBefore=string], [mute=boolean], [override=boolean], [parent=string], [passthrough=boolean], [preferred=boolean], [removeAllAttributes=boolean], [removeAttribute=string], [root=string], [selected=boolean], [solo=boolean], [weight=float], [writeBlendnodeDestinations=boolean])

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

animLayer is undoable, queryable, and editable.

This command creates and edits animation layers.

Return value

stringReturn values currently not documented.

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

Keywords

layer, animation, additive, override

Related

blendTwoAttr, setKeyframe

Flags

addRelatedKG, addSelectedObjects, affectedLayers, animCurves, attribute, baseAnimCurves, bestAnimLayer, bestLayer, blendNodes, children, collapse, copy, copyAnimation, copyNoAnimation, excludeBoolean, excludeDynamic, excludeEnum, excludeRotate, excludeScale, excludeTranslate, excludeVisibility, exists, extractAnimation, findCurveForPlug, forceUIRebuild, forceUIRefresh, layeredPlug, lock, moveLayerAfter, moveLayerBefore, mute, override, parent, passthrough, preferred, removeAllAttributes, removeAttribute, root, selected, solo, weight, writeBlendnodeDestinations
Long name (short name) Argument types Properties
root(r) string query
Return the base layer if it exist
mute(m) boolean createqueryedit
Set the mute state of the specified layer. Default is false.
solo(s) boolean createqueryedit
Set the solo state of the specified layer. Default is false.
override(o) boolean createqueryedit
Set the overide state of the specified layer. Default is false.
passthrough(pth) boolean createqueryedit
Set the passthrough state of the specified layer. Default is true.
lock(l) boolean createqueryedit
Set the lock state of the specified layer. A locked layer can not receive key. Default is false.
parent(p) string createqueryedit
Set the parent of the specified layer. Default is the animation layer root.
children(c) string query
Get the list of children layers. return value is a string array.
weight(w) float createqueryedit
Set the weight of the specified layer between 0.0 and 1.0. Default is 1.
attribute(at) string createqueryeditmultiuse
Adds a specific attribute on a object to the layer.
bestAnimLayer(blr) boolean createqueryedit
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.
animCurves(anc) boolean createqueryedit
In query mode returns the anim curves associated with this layer
writeBlendnodeDestinations(wbd) boolean edit
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.
baseAnimCurves(bac) boolean createqueryedit
In query mode returns the base layer anim curves associated with this layer, if any.
blendNodes(bld) boolean createqueryedit
In query mode returns the blend nodes associated with this layer
addSelectedObjects(aso) boolean createqueryedit
Adds selected object(s) to the layer.
excludeTranslate(etr) boolean createqueryedit
When adding selected object(s) to the layer, excludes the translate attribute.
excludeRotate(ert) boolean createqueryedit
When adding selected object(s) to the layer, exclude the rotate attribute.
excludeScale(esc) boolean createqueryedit
When adding selected object(s) to the layer, exclude the scale attribute.
excludeVisibility(evs) boolean createqueryedit
When adding selected object(s) to the layer, exclude the visibility attribute.
excludeBoolean(ebl) boolean createqueryedit
When adding selected object(s) to the layer, excludes any boolean attributes.
excludeDynamic(edn) boolean createqueryedit
When adding selected object(s) to the layer, excludes any dynamic attributes.
excludeEnum(een) boolean createqueryedit
When adding selected object(s) to the layer, excludes any enum attributes.
addRelatedKG(akg) boolean createqueryedit
Used adding attributes to a layer. Determines if associated keying groups should be added or not to the layer.
removeAttribute(ra) string editmultiuse
Remove object from layer.
removeAllAttributes(raa) boolean edit
Remove all objects from layer.
copy(cp) string edit
Copy from layer.
copyNoAnimation(cna) string edit
Copy from layer without the animation curves.
exists(ex) boolean query
Determine if an layer exists.
preferred(prf) boolean createqueryedit
Determine if a layer is a preferred layer, the best layer algorithm will try to set keyframe in preferred layer first.
selected(sel) boolean createqueryedit
Determine if a layer is selected, a selected layer will be show in the timecontrol, graph editor.
collapse(col) boolean createqueryedit
Determine if a layer is collapse in the layer editor.
bestLayer(bl) boolean query
Return the layer that will be keyed for specified attribute.
affectedLayers(afl) boolean query
Return the layers that the currently selected object(s) are members of
moveLayerAfter(mva) string edit
Move layer after the specified layer
moveLayerBefore(mvb) string edit
Move layer before the specified layer
layeredPlug(lp) string query
returns the plug on the blend node corresponding to the specified layer
extractAnimation(ea) string createedit
transfer animation from specified layer to destination layer, only animation that are on attribute layered by both layer that are concerned.
copyAnimation(ca) string createedit
copy animation from specified layer to destination layer, only animation that are on attribute layered by both layer that are concerned.
forceUIRefresh(uir) boolean create
refreshes the animation layers user interface.
forceUIRebuild(fur) boolean create
rebuilds the animation layers user interface.
findCurveForPlug(fcv) string edit
finds the parameter curve containing the animation data for the specified plug on the given layer.

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

cmds.animLayer("layer1", mute=True, solo=True, override=True, passthrough=False, lock=True)
cmds.animLayer("layer1", query=True, mute=True)
# Result: 1 #
cmds.animLayer("layer1", query=True, solo=True)
# Result: 1 #
cmds.animLayer("layer1", query=True, override=True)
# Result: 1 #
cmds.animLayer("layer1", query=True, passthrough=True)
# Result: 0 #
cmds.animLayer("layer1", query=True, lock=True)
# Result: 1 #
cmds.animLayer("layer1", query=True, parent=True)
# Result: BaseAnimation #