ジャンプ先: 概要. 戻り値. キーワード. 関連項目. フラグ. MEL 例.
attributeQuery [-connectable] [-enum]
[-exists] [-hidden] [-indexMatters] [-internal] [-internalGet] [-internalSet] [-keyable] [-listChildren] [-listDefault] [-listEnum] [-listParent] [-listSiblings] [-longName] [-maxExists] [-maximum] [-message]
[-minExists] [-minimum] [-multi]
[-niceName] [-node name] [-numberOfChildren] [-range] [-rangeExists] [-readable] [-shortName] [-softMax] [-softMaxExists] [-softMin] [-softMinExists] [-softRange] [-softRangeExists] [-storable] [-type
string] [-typeExact
string] [-usedAsColor]
[-writable]
attributeQuery は 「元に戻す」が不可能、「照会」が不可能、「編集」が不可能 です。
attributeQuery は、アトリビュートの構成に関する情報を返します。両方のブーリアン フラグを処理し、他の戻り値と同様に true または false を返します。複数のブーリアン フラグを指定すると、指定したすべてのブーリアン フラグの論理和を返します。両方がブーリアン タイプの戻り値を返すのでなければ、2 つのフラグを指定することはできません。(たとえば、「-internal -hidden」は指定できますが、「-range -hidden」や「-range -softRange」は指定できません)。| float[] | 範囲またはデフォルト値を照会する場合 |
| boolean | アトリビュート フラグを照会する場合 |
| ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
|---|---|---|---|---|
-type(-typ) |
string |
|||
|
||||
-typeExact(-tex) |
string |
|||
|
||||
-node(-n) |
name |
|||
|
||||
-exists(-ex) |
||||
|
||||
-internal(-i) |
||||
|
||||
-internalSet(-is) |
||||
|
||||
-internalGet(-ig) |
||||
|
||||
-keyable(-k) |
||||
|
||||
-connectable(-c) |
||||
|
||||
-message(-msg) |
||||
|
||||
-enum(-e) |
||||
|
||||
|
||||
-indexMatters(-im) |
||||
|
||||
-readable(-rd) |
||||
|
||||
-storable(-st) |
||||
|
||||
-writable(-w) |
||||
|
||||
-multi(-m) |
||||
|
||||
-minimum(-min) |
||||
|
||||
-maximum(-max) |
||||
|
||||
-range(-r) |
||||
|
||||
-usedAsColor(-uac) |
||||
|
||||
-softRange(-s) |
||||
|
||||
-softMin(-smn) |
||||
|
||||
-softMax(-smx) |
||||
|
||||
-numberOfChildren(-nc) |
||||
|
||||
-listSiblings(-ls) |
||||
|
||||
-listChildren(-lc) |
||||
|
||||
-listParent(-lp) |
||||
|
||||
-listEnum(-le) |
||||
|
||||
-listDefault(-ld) |
||||
|
||||
-minExists(-mne) |
||||
|
||||
-maxExists(-mxe) |
||||
|
||||
-rangeExists(-re) |
||||
|
||||
-softMinExists(-sme) |
||||
|
||||
-softMaxExists(-sxe) |
||||
|
||||
-softRangeExists(-se) |
||||
|
||||
-longName(-ln) |
||||
|
||||
-shortName(-sn) |
||||
|
||||
-niceName(-nn) |
||||
|
||||
// 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 //