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

Synopsis

attributeInfo [-allAttributes] [-bool boolean] [-enumerated boolean] [-hidden boolean] [-internal boolean] [-leaf boolean] [-logicalAnd] [-multi boolean] [-short] [-type string] [-userInterface] [-writable boolean]

attributeInfo is NOT 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 "logicalAnd/and" flag.) When the "allAttributes/all" flag is specified, attributes of all types will be listed.

Return value

string[] List of attributes matching criteria

Keywords

attribute

Related

addAttr, affectedNet, affects, aliasAttr, deleteAttr, getClassification, nodeType, objExists, objectType, renameAttr

Flags

allAttributes, bool, enumerated, hidden, internal, leaf, logicalAnd, multi, short, type, userInterface, writable
Long name (short name) Argument types Properties
-internal(-i) boolean create
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 create
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 create
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 create
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 create
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 create
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 create
Show the attributes that are of type enumerated. Use the 'on' state to get only enumerated attributes; the 'off' state to ignore enumerated attributes.
-allAttributes(-all) create
Show all attributes associated with the node regardless of type. Use of this flag overrides any other attribute type flags and logical operation that may be specified on the command.
-logicalAnd(-and) create
The default is to take the logical 'or' of the above conditions. Specifying this flag switches to the logical 'and' instead.
-short(-s) create
Show the short attribute names instead of the long names.
-userInterface(-ui) create
Show the UI-friendly attribute names instead of the Maya ASCII names. Takes precedence over the -s/-short flag if both are specified.
-type(-t) string create
static node type from which to get 'affects' information

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 be used more than once in a command.

MEL examples

// Create a choice node
createNode choice;
// Result: choice1
// Get the list of hidden choice node attributes
//
attributeInfo -h on -t choice;
// Result: message isHistoricallyInteresting binMembership //
// Get the list of all boolean or enumerated transform node attributes
//
attributeInfo -b on -e on -t transform;
// Result: caching nodeState visibility intermediateObject template ghosting useObjectColor overrideDisplayType overrideLevelOfDetail overrideShading overrideTexturing overridePlayback overrideEnabled overrideVisibility lodVisibility layerRenderable renderLayerRenderable ghostingControl rotateOrder minTransXLimitEnable minTransYLimitEnable minTransZLimitEnable maxTransXLimitEnable maxTransYLimitEnable maxTransZLimitEnable minRotXLimitEnable minRotYLimitEnable minRotZLimitEnable maxRotXLimitEnable maxRotYLimitEnable maxRotZLimitEnable minScaleXLimitEnable minScaleYLimitEnable minScaleZLimitEnable maxScaleXLimitEnable maxScaleYLimitEnable maxScaleZLimitEnable inheritsTransform displayHandle displayScalePivot displayRotatePivot displayLocalAxis dynamics showManipDefault rotationInterpolation miDeriveFromMaya miHide miVisible miTrace miShadow miCaustic miGlobillum miExportGeoShader//
// Get the list of short names of hidden attributes on one
// particular choice node
//
attributeInfo -s -h on choice1;
// Result: msg ihi bnm //
// Get the list of all attributes on choice nodes
attributeInfo -all -type choice;
// Result: message caching isHistoricallyInteresting nodeState binMembership selector input output //
// 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).
//
select choice1; attributeInfo -ui -h on -i on -and;
// Result: Bin Membership //