Go to: Synopsis. Flags. Return value. Keywords. Related. Python examples.
attributeInfo([bool=boolean], [enumerated=boolean], [hidden=boolean], [internal=boolean], [leaf=boolean], [logicalAnd=boolean], [multi=boolean], [short=boolean], [userInterface=boolean], [writable=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
attributeInfo is undoable, NOT queryable, and NOT editable.
This command lists all of the attributes that are marked with certain
flags. Combinations of flags may be specified and all will be considered.
(The method of combination depends on the state of the -and -b flags.)
bool, enumerated, hidden, internal, leaf, logicalAnd, multi, short, userInterface, writable
Long name (short name) |
[argument types] |
Properties |
internal(i)
|
boolean
|
|
|
Show the attributes that are marked as internal to the node.
Use the 'on' state to get internal attributes; the 'off' state
to get non-internal attributes.
|
|
hidden(h)
|
boolean
|
|
|
Show the attributes that are marked as hidden.
Use the 'on' state to get hidden attributes; the 'off' state
to get non-hidden attributes.
|
|
multi(m)
|
boolean
|
|
|
Show the attributes that are multis.
Use the 'on' state to get multi attributes; the 'off' state
to get non-multi attributes.
|
|
leaf(l)
|
boolean
|
|
|
Show the attributes that are complex leaves (ie. that have parent attributes
and have no children themselves).
Use the 'on' state to get leaf attributes; the 'off' state
to get non-leaf attributes.
|
|
writable(w)
|
boolean
|
|
|
Show the attributes that are writable (ie. can have input connections).
Use the 'on' state to get writable attributes; the 'off' state
to get non-writable attributes.
|
|
bool(b)
|
boolean
|
|
|
Show the attributes that are of type boolean.
Use the 'on' state to get only boolean attributes; the 'off' state
to ignore boolean attributes.
|
|
enumerated(e)
|
boolean
|
|
|
Show the attributes that are of type enumerated.
Use the 'on' state to get only enumerated attributes; the 'off' state
to ignore enumerated attributes.
|
|
logicalAnd(logicalAnd)
|
boolean
|
|
|
The default is to take the logical 'or' of the above conditions.
Specifying this flag switches to the logical 'and' instead.
|
|
short(s)
|
boolean
|
|
|
Show the short attribute names instead of the long names.
|
|
userInterface(ui)
|
boolean
|
|
|
Show the UI-friendly attribute names instead of the Maya ASCII names.
Takes precedence over the -s/-short flag if both are specified.
|
|
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.
|
[string[]]
: List of attributes matching criteria
attribute
addAttr, affectedNet, affects, aliasAttr, deleteAttr, getClassification, nodeType, objExists, objectType, renameAttr
import maya.cmds as cmds
cmds.createNode( 'choice' )
# Get the list of only hidden choice node attributes
#
cmds.select( 'choice1' )
cmds.attributeInfo( h=True, t='choice' )
# Result: [u'message', u'isHistoricallyInteresting', u'binMembership'] #
# Get the list of all boolean or enumerated transform node attributes
#
cmds.attributeInfo( b=True, e=True, t='transform' )
# Result: [u'caching', u'nodeState', u'visibility', u'intermediateObject', u'template', u'ghosting', u'useObjectColor', u'overrideDisplayType', u'overrideLevelOfDetail', u'overrideShading', u'overrideTexturing', u'overridePlayback', u'overrideEnabled', u'overrideVisibility', u'lodVisibility', u'layerRenderable', u'renderLayerRenderable', u'ghostingControl', u'rotateOrder', u'minTransXLimitEnable', u'minTransYLimitEnable', u'minTransZLimitEnable', u'maxTransXLimitEnable', u'maxTransYLimitEnable', u'maxTransZLimitEnable', u'minRotXLimitEnable', u'minRotYLimitEnable', u'minRotZLimitEnable', u'maxRotXLimitEnable', u'maxRotYLimitEnable', u'maxRotZLimitEnable', u'minScaleXLimitEnable', u'minScaleYLimitEnable', u'minScaleZLimitEnable', u'maxScaleXLimitEnable', u'maxScaleYLimitEnable', u'maxScaleZLimitEnable', u'inheritsTransform', u'displayHandle', u'displayScalePivot', u'displayRotatePivot', u'displayLocalAxis', u'dynamics', u'showManipDefault', u'rotationInterpolation', u'miDeriveFromMaya', u'miHide', u'miVisible', u'miTrace', u'miShadow', u'miCaustic', u'miGlobillum', u'miExportGeoShader'] #
# Get the list of short names of compound or root attributes on one
# particular choice node
#
# Result: choice1
cmds.select( 'choice1' )
cmds.attributeInfo( s='choice1' )
# Result: message input output selector
# Get the list of hidden internal attributes on one particular choice node
# using the UI name for the attributes (that is the one that will show up
# in the attribute editor).
#
cmds.select( 'choice1' )
cmds.attributeInfo( ui=True, h=True, i=True )
# Result: [u'Message', u'Caching', u'Is Historically Interesting', u'Node State', u'Bin Membership'] #