移動先: 概要 戻り値 関連項目. フラグ. Python 例.
listAttr(
[objects]
, [array=boolean], [caching=boolean], [changedSinceFileOpen=boolean], [channelBox=boolean], [connectable=boolean], [hasData=boolean], [hasNullData=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[] | : 基準に一致するアトリビュートのリスト |
ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
---|---|---|---|---|
read(r)
|
boolean
|
![]() |
||
|
||||
write(w)
|
boolean
|
![]() |
||
|
||||
scalar(s)
|
boolean
|
![]() |
||
|
||||
array(a)
|
boolean
|
![]() |
||
|
||||
scalarAndArray(sa)
|
boolean
|
![]() |
||
|
||||
visible(v)
|
boolean
|
![]() |
||
|
||||
connectable(c)
|
boolean
|
![]() |
||
|
||||
keyable(k)
|
boolean
|
![]() |
||
|
||||
channelBox(cb)
|
boolean
|
![]() |
||
|
||||
caching(ca)
|
boolean
|
![]() |
||
|
||||
multi(m)
|
boolean
|
![]() |
||
|
||||
locked(l)
|
boolean
|
![]() |
||
|
||||
unlocked(u)
|
boolean
|
![]() |
||
|
||||
userDefined(ud)
|
boolean
|
![]() |
||
|
||||
settable(se)
|
boolean
|
![]() |
||
|
||||
shortNames(sn)
|
boolean
|
![]() |
||
|
||||
string(st)
|
string
|
![]() ![]() |
||
|
||||
readOnly(ro)
|
boolean
|
![]() |
||
|
||||
output(o)
|
boolean
|
![]() |
||
|
||||
hasData(hd)
|
boolean
|
![]() |
||
|
||||
hasNullData(hnd)
|
boolean
|
![]() |
||
|
||||
leaf(lf)
|
boolean
|
![]() |
||
|
||||
changedSinceFileOpen(cfo)
|
boolean
|
![]() |
||
|
||||
ramp(ra)
|
boolean
|
![]() |
||
|
||||
usedAsFilename(uf)
|
boolean
|
![]() |
||
|
![]() |
![]() |
![]() |
![]() |
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( '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.