ジャンプ先: 概要. 戻り値. キーワード. 関連. フラグ. MEL 例.
 attributeQuery [-affectsAppearance] [-affectsWorldspace] [-attributeType] [-cachedInternally] [-categories] [-channelBox] [-connectable] [-enum] [-exists] [-hidden] [-indeterminant] [-indexMatters] [-internal] [-internalGet] [-internalSet] [-keyable] [-listChildren] [-listDefault] [-listEnum] [-listParent] [-listSiblings] [-longName] [-maxExists] [-maximum] [-message] [-minExists] [-minimum] [-multi] [-niceName] [-node name] [-numberOfChildren] [-range] [-rangeExists] [-readable] [-renderSource] [-shortName] [-softMax] [-softMaxExists] [-softMin] [-softMinExists] [-softRange] [-softRangeExists] [-storable] [-type string] [-typeExact string] [-usedAsColor] [-usedAsFilename] [-usesMultiBuilder] [-worldspace] [-writable]   
attributeQuery は、取り消し不可能、照会不可能、および編集不可能です。
attributeQuery は、アトリビュートの構成に関する情報を返します。両方のブーリアン フラグを処理し、他の戻り値と同様に true または false を返します。複数のブーリアン フラグを指定すると、指定したすべてのブーリアン フラグの論理和を返します。両方がブーリアン タイプの戻り値を返すのでなければ、2 つのフラグを指定することはできません。(たとえば、「-internal -hidden」は指定できますが、「-range -hidden」や「-range -softRange」は指定できません)。| float[] | 範囲または既定値を照会する場合 | 
| boolean | アトリビュート フラグを照会する場合 | 
| ロング ネーム(ショート ネーム) | 引数タイプ | プロパティ | ||
|---|---|---|---|---|
| -affectsAppearance(-aa) |  |   | ||
| 
 | ||||
| -affectsWorldspace(-aws) |  |   | ||
| 
 | ||||
| -attributeType(-at) |  |   | ||
| 
 | ||||
| -categories(-ct) |  |   | ||
| 
 | ||||
| -cachedInternally(-ci) |  |   | ||
| 
 | ||||
| -channelBox(-ch) |  |   | ||
| 
 | ||||
| -connectable(-c) |  |   | ||
| 
 | ||||
| -enum(-e) |  |   | ||
| 
 | ||||
| -exists(-ex) |  |   | ||
| 
 | ||||
| -hidden(-h) |  |   | ||
| 
 | ||||
| -indeterminant(-idt) |  |   | ||
| 
 | ||||
| -indexMatters(-im) |  |   | ||
| 
 | ||||
| -internal(-i) |  |   | ||
| 
 | ||||
| -internalGet(-ig) |  |   | ||
| 
 | ||||
| -internalSet(-is) |  |   | ||
| 
 | ||||
| -keyable(-k) |  |   | ||
| 
 | ||||
| -listChildren(-lc) |  |   | ||
| 
 | ||||
| -listDefault(-ld) |  |   | ||
| 
 | ||||
| -listEnum(-le) |  |   | ||
| 
 | ||||
| -listParent(-lp) |  |   | ||
| 
 | ||||
| -listSiblings(-ls) |  |   | ||
| 
 | ||||
| -longName(-ln) |  |   | ||
| 
 | ||||
| -maxExists(-mxe) |  |   | ||
| 
 | ||||
| -maximum(-max) |  |   | ||
| 
 | ||||
| -message(-msg) |  |   | ||
| 
 | ||||
| -minExists(-mne) |  |   | ||
| 
 | ||||
| -minimum(-min) |  |   | ||
| 
 | ||||
| -multi(-m) |  |   | ||
| 
 | ||||
| -niceName(-nn) |  |   | ||
| 
 | ||||
| -node(-n) | name |   | ||
| 
 | ||||
| -numberOfChildren(-nc) |  |   | ||
| 
 | ||||
| -range(-r) |  |   | ||
| 
 | ||||
| -rangeExists(-re) |  |   | ||
| 
 | ||||
| -readable(-rd) |  |   | ||
| 
 | ||||
| -renderSource(-rs) |  |   | ||
| 
 | ||||
| -shortName(-sn) |  |   | ||
| 
 | ||||
| -softMin(-smn) |  |   | ||
| 
 | ||||
| -softMinExists(-sme) |  |   | ||
| 
 | ||||
| -softMax(-smx) |  |   | ||
| 
 | ||||
| -softMaxExists(-sxe) |  |   | ||
| 
 | ||||
| -softRange(-s) |  |   | ||
| 
 | ||||
| -softRangeExists(-se) |  |   | ||
| 
 | ||||
| -storable(-st) |  |   | ||
| 
 | ||||
| -type(-typ) | string |   | ||
| 
 | ||||
| -typeExact(-tex) | string |   | ||
| 
 | ||||
| -usedAsColor(-uac) |  |   | ||
| 
 | ||||
| -usedAsFilename(-uaf) |  |   | ||
| 
 | ||||
| -usesMultiBuilder(-umb) |  |   | ||
| 
 | ||||
| -worldspace(-ws) |  |   | ||
| 
 | ||||
| -writable(-w) |  |   | ||
| 
 | ||||
|  フラグはコマンドの作成モードで表示できます |  フラグはコマンドの編集モードで表示できます | 
|  フラグはコマンドの照会モードで表示できます |  コマンド内でフラグを複数回使用できます。 | 
// 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 -ct "fowl"; attributeQuery -node "pCube1" -listEnum "myEnum"; // Result: chicken:turkey:duck // // Secondary way to find an attribute's type directly attributeQuery -node "pCube1" -attributeType "myEnum"; // Result: enum // // See to which categories and attribute belongs attributeQuery -node "pCube1" -categories "myEnum"; // Result: fowl //