ジャンプ先: 概要. 戻り値.
関連項目. フラグ. Python 例.
listAttr( [objects] , [array=boolean], [caching=boolean], [category=string], [changedSinceFileOpen=boolean],
[channelBox=boolean],
[connectable=boolean],
[extension=boolean], [fromPlugin=boolean], [hasData=boolean], [hasNullData=boolean], [inUse=boolean], [keyable=boolean], [leaf=boolean], [locked=boolean], [multi=boolean], [output=boolean], [ramp=boolean], [read=boolean], [readOnly=boolean], [scalar=boolean], [scalarAndArray=boolean], [settable=boolean], [shortNames=boolean], [string=string], [unlocked=boolean], [usedAsFilename=boolean], [userDefined=boolean], [visible=boolean], [write=boolean])
注意:
オブジェクト名や引数を表す文字列はカンマで区切ります。これは概要には示されていません。
listAttr は 「元に戻す」が可能、「照会」が不可能、「編集」が不可能 です。
ノードのアトリビュートがリストされます。フラグを指定しないと、すべてのアトリビュートがリストされます。
string[] |
: 基準に一致するアトリビュートのリスト |
addAttr, attributeInfo, attributeQuery, connectAttr, disconnectAttr, getAttr, setAttr
array, caching,
category, changedSinceFileOpen, channelBox, connectable, extension, fromPlugin, hasData, hasNullData, inUse,
keyable, leaf,
locked, multi,
output, ramp,
read, readOnly,
scalar, scalarAndArray, settable, shortNames, string,
unlocked, usedAsFilename, userDefined, visible, write
ロング ネーム(ショート ネーム) |
引数型 |
プロパティ |
read(r) |
boolean |
![create create](../gfx/create.gif) |
|
読み込み可能なアトリビュートのみがリストされます。 |
|
write(w) |
boolean |
![create create](../gfx/create.gif) |
|
書き込み可能なアトリビュートのみがリストされます。 |
|
scalar(s) |
boolean |
![create create](../gfx/create.gif) |
|
array(a) |
boolean |
![create create](../gfx/create.gif) |
|
配列(マルチ以外)アトリビュートのみがリストされます。 |
|
scalarAndArray(sa) |
boolean |
![create create](../gfx/create.gif) |
|
スカラー アトリビュートと配列アトリビュートのみがリストされます。 |
|
visible(v) |
boolean |
![create create](../gfx/create.gif) |
|
可視アトリビュート、つまり隠れていないアトリビュートのみが表示されます。 |
|
connectable(c) |
boolean |
![create create](../gfx/create.gif) |
|
category(ct) |
string |
![create create](../gfx/create.gif) ![multiuse multiuse](../gfx/multiuse.gif) |
|
指定したカテゴリに属するアトリビュートのみを表示します。 カテゴリの文字列には正規表現を使用できます。 |
|
fromPlugin(fp) |
boolean |
![create create](../gfx/create.gif) |
|
プラグインで作成されたアトリビュートのみを表示します |
|
inUse(iu) |
boolean |
![create create](../gfx/create.gif) |
|
現在、使用中とマークされたアトリビュートのみを表示します。このフラグは、アトリビュートが何らかの方法でシーン
データに作用していることを示します。たとえば、デフォルト以外の値を持つか、別のアトリビュートにコネクトされています。これは一般的な例であり、実際はそれぞれ異なります。 |
|
keyable(k) |
boolean |
![create create](../gfx/create.gif) |
|
キーフレームにできるアトリビュートのみが表示されます。 |
|
channelBox(cb) |
boolean |
![create create](../gfx/create.gif) |
|
チャンネル ボックスに表示されるキー設定不可のアトリビュートだけを表示します。 |
|
caching(ca) |
boolean |
![create create](../gfx/create.gif) |
|
内部的にキャッシュされているアトリビュートのみが表示されます。 |
|
extension(ex) |
boolean |
![create create](../gfx/create.gif) |
|
このタイプのすべてのノードのユーザ定義アトリビュート(拡張子アトリビュート)のリストを表示します。 |
|
multi(m) |
boolean |
![create create](../gfx/create.gif) |
|
マルチアトリビュートの既存のエレメントがリストされます。 |
|
locked(l) |
boolean |
![create create](../gfx/create.gif) |
|
ロックされているアトリビュートのみがリストされます。 |
|
unlocked(u) |
boolean |
![create create](../gfx/create.gif) |
|
ロックが解除されているアトリビュートのみがリストされます。 |
|
userDefined(ud) |
boolean |
![create create](../gfx/create.gif) |
|
ユーザ定義(ダイナミック)アトリビュートがリストされます。 |
|
settable(se) |
boolean |
![create create](../gfx/create.gif) |
|
shortNames(sn) |
boolean |
![create create](../gfx/create.gif) |
|
ショート アトリビュート ネームがリストされます。デフォルトではロング ネームがリストされます。 |
|
string(st) |
string |
![create create](../gfx/create.gif) ![multiuse multiuse](../gfx/multiuse.gif) |
|
他の基準に一致し、さらにこのフラグから渡された文字列に一致するアトリビュートのみを表示します。
文字列には正規表現を使用できます。 |
|
readOnly(ro) |
boolean |
![create create](../gfx/create.gif) |
|
読み込み可能だが書き込み不可能なアトリビュートのみがリストされます。 |
|
output(o) |
boolean |
![create create](../gfx/create.gif) |
|
数値であるか、数値アトリビュートの複合であるアトリビュートのみがリストされます。 |
|
hasData(hd) |
boolean |
![create create](../gfx/create.gif) |
|
データを持つアトリビュートのみがリストされます(メッセージ アトリビュート以外すべてのアトリビュート)。 |
|
hasNullData(hnd) |
boolean |
![create create](../gfx/create.gif) |
|
ヌル データを持つアトリビュートのみがリストされます。データを持つすべてのアトリビュートがリストされますが(hasData
フラグ参照)、データ値は初期化されません。アトリビュートがヌル
データを持つ一般的な例として、文字列アトリビュートが作成されたが、初期値がまだ代入されていない場合が挙げられます。同様に、配列型データは初期化されるまでヌルの場合がよくあります。 |
|
leaf(lf) |
boolean |
![create create](../gfx/create.gif) |
|
アトリビュートの名前の末端のみがリストされます。controlPoints[44].xValue
ならば、「xValue」とリストされます。 |
|
changedSinceFileOpen(cfo) |
boolean |
![create create](../gfx/create.gif) |
|
アトリビュートの元のファイルが開いてから変更されたアトリビュートのみがリストされます。特に、リファレンス
ファイルのオブジェクトやアトリビュートのみに便利です。 |
|
ramp(ra) |
boolean |
![create create](../gfx/create.gif) |
|
usedAsFilename(uf) |
boolean |
![create create](../gfx/create.gif) |
|
ファイル名として扱われるように指定したアトリビュートのみをリスト表示します |
|
: コマンドの作成モードで使用可能なフラグ |
: コマンドの編集モードで使用可能なフラグ |
: コマンドの照会モードで使用可能なフラグ |
: タプルまたはリストとして渡された複数の引数を持てるフラグ |
import maya.cmds as cmds
cmds.sphere()
cmds.listAttr( r=True, s=True )
# This will list the scalar readable attributes of the
# selected nodes. If more than one node is selected attributes
# may be listed several times.
cmds.listAttr( s=True, r=True, w=True, c=True, st=['centerX','centerY'] )
# This will list all scalar, readable, writable, and connectable
# attributes whose names are "centerX" or "centerY".
cmds.listAttr( r=True, st='center*', ct='a*' )
# This will list all readable attributes whose names match
# "center*" (e.g. "centerX" or "centerpede") and who belong to
# a category starting with the letter "a".
cmds.listAttr( 'nurbsSphere1', s=True, cfo=True )
# This will list all scalar attributes of
# nurbsSphere1 that have been changed since the
# file in which nurbsSphere1 is defined has been
# opened. If nurbsSphere1 comes from a referenced file,
# the result will be all the attributes that have changed
# since the referenced file was opened.