Your Ad Here

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

Synopsis

listDeviceAttachments([attribute=boolean], [axis=boolean], [clutch=boolean], [device=boolean], [file=boolean], [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, queryable, and 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.

Flags

attribute, axis, clutch, device, file, selection, write
Long name (short name) [argument types] Properties
device(d) boolean
specify which device attachments to list
axis(ax) boolean
specify the axis attachments to list
clutch(c) boolean
List only attachment clutched with this button
attribute(at) boolean
specify the attribute attachments to list
selection(sl) boolean
This flag list only attachments on selection
write(w) boolean
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) boolean
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.

Return value


String

Related

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

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 )

  

Return to Autodesk Index


Your Ad Here