Go to: Synopsis. Return value. Related. Flags. Python examples.


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

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

listDeviceAttachments is undoable, NOT queryable, and NOT editable.

This command lists the current set of device attachments. The listing is in the form of the commands required to recreate them. This includes both attachments and device mappings.

Return value



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


attribute, axis, clutch, device, file, selection, write
Long name (short name) Argument types Properties
device(d) string create
specify which device attachments to list
axis(ax) string create
specify the axis attachments to list
clutch(c) string create
List only attachment clutched with this button
attribute(at) string create
specify the attribute attachments to list
selection(sl) boolean create
This flag list only attachments on selection
write(w) boolean create
Write out device attachments to a file specified by the -f flag, is set. If -f is not set, it'll write out to a file named for the device.
file(f) string create
Specify the name of the file to write out device attachments.

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

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 )