Go to: Return value. Related commands. Flags. Examples.
attributeQuery
[-type string]
[-node select]
[-exists toggle]
[-internal toggle]
[-internalSet toggle]
[-internalGet toggle]
[-keyable toggle]
[-connectable toggle]
[-message toggle]
[-enum toggle]
[-hidden toggle]
[-indexMatters toggle]
[-readable toggle]
[-storable toggle]
[-writable toggle]
[-multi toggle]
[-minimum toggle]
[-maximum toggle]
[-range toggle]
[-usedAsColor toggle]
[-softRange toggle]
[-softMin toggle]
[-softMax toggle]
[-numberOfChildren toggle]
[-listSiblings toggle]
[-listChildren toggle]
[-listParent toggle]
[-listEnum toggle]
[-listDefault toggle]
[-minExists toggle]
[-maxExists toggle]
[-rangeExists toggle]
[-softMinExists toggle]
[-softMaxExists toggle]
[-softRangeExists toggle]
attributeQuery is NOT undoable, NOT queryable, and NOT editable .
[float array] when querying ranges or default values
connectable, enum, exists, hidden, indexMatters, internal, internalGet, internalSet, keyable, listChildren, listDefault, listEnum, listParent, listSiblings, maxExists, maximum, message, minExists, minimum, multi, node, numberOfChildren, range, rangeExists, readable, softMax, softMaxExists, softMin, softMinExists, softRange, softRangeExists, storable, type, usedAsColor, writable
![]() | ![]() |
![]() | ![]() |
// Determine the hidden status of the "selector" attribute on choice nodes. // attributeQuery -typ choice -h selector; // Result: 0 // Determine the hidden status of the "selector" attribute on this choice node. // (Usually the same but you can do this for dynamic attributes too.) // createNode choice -n whoIsIt; // Result: choice1 attributeQuery -n whoIsIt -h selector; // Result: 0 // Determine the range of the selector value on choice nodes. // In this case there is no range. // Note, if there is only a minimum or only a maximum range will not set. // attributeQuery -typ choice -range selector; // For the next several examples create a poly cube and add extra attributes. polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1; addAttr -ln egRange -at long -min 0 -max 5 -dv 2 |pCube1; setAttr -e -keyable false |pCube1.egRange; // Determine if an attribute is keyable // attributeQuery -node "pCube1" -k "egRange"; // Result: 0 // Determine the minimum and maximum values of the added attribute egRange // attributeQuery -node "pCube1" -range "egRange"; // Result: 0 5 // Determine if there is a minimum for the attribute. // Note, having a minimum or maximum value does not imply the attribute has a range. addAttr -ln egMin -at long -min 2 |pCube1; attributeQuery -node "pCube1" -minExists "egMin"; // Result: 1 attributeQuery -node "pCube1" -maxExists "egMin"; // Result: 0 attributeQuery -node "pCube1" -min "egMin"; // Result: 2 // Determine if an attribute is an enum // List the enum strings. This will use ':' as a separator like the attr is written in // an .ma file. addAttr -ln myEnum -at "enum" -en "chicken:turkey:duck:" |pCube1; attributeQuery -node "pCube1" -listEnum "myEnum"; // Result: chicken:turkey:duck //