ジャンプ先: 概要. 戻り値. 関連. フラグ. Python 例.

概要

listDeviceAttachments([attribute=string], [axis=string], [clutch=string], [device=string], [file=string], [selection=boolean], [write=boolean])

注: オブジェクトの名前と引数を表す文字列は、カンマで区切る必要があります。これはシノプシスに示されていません。

listDeviceAttachments は、取り消し可能、照会不可能、および編集不可能です。

デバイス アタッチメントの現在のセットがリストされます。リストは、デバイス アタッチメントの再作成に必要となるコマンドの形式になります。これには、アタッチメント マッピングとデバイス マッピングの両方が含まれます。

戻り値

stringコマンドの結果

関連

assignInputDevice, attachDeviceAttr, detachDeviceAttr, devicePanel, getInputDeviceRange, getModifiers, listInputDeviceAxes, listInputDeviceButtons, listInputDevices, recordAttr, setAttrMapping, setInputDeviceMapping, unassignInputDevice

フラグ

attribute, axis, clutch, device, file, selection, write
ロング ネーム(ショート ネーム) 引数タイプ プロパティ
attribute(at) string create
リストするアトリビュート アタッチメントを指定します。
axis(ax) string create
リストする軸アタッチメントを指定します。
clutch(c) string create
このボタンでつかまるアタッチメントのみがリストされます。
device(d) string create
リストするデバイス アタッチメントを指定します。
file(f) string create
デバイス アタッチメントを書き出すファイルの名前を指定します。
selection(sl) boolean create
選択したアタッチメントのみがリストされます。
write(w) boolean create
-f フラグを設定している場合は、-f フラグで指定したファイルにデバイス アタッチメントが書き出されます。-f フラグを設定していない場合は、デバイスに指定したファイルに書き出されます。

フラグはコマンドの作成モードで表示できます フラグはコマンドの編集モードで表示できます
フラグはコマンドの照会モードで表示できます フラグに複数の引数を指定し、タプルまたはリストとして渡すことができます。

Python 例

import maya.cmds as cmds

cmds.listDeviceAttachments()# List all attachments

# List attachments on the spaceball that are clutched on Button1
cmds.listDeviceAttachments( d='spaceball', c='Button1' )

# write out attachments for the spaceball device, since there is
# no file name specified, attachments will be written out to
# spaceball.mel
cmds.listDeviceAttachments( d='spaceball', w=True )

# write out attachments for all devices, since there is not file
# name specified, attachments will be written out to devices.mel
cmds.listDeviceAttachments( w=True )