Your Ad Here

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

Synopsis

enableDevice([apply=string...], [device=string], [enable=boolean], [monitor=boolean], [query=boolean], [record=boolean])

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

enableDevice is undoable, queryable, and editable.

Sets (or queries) the device enable state for actions involving the device.
-monitor
affects all assignInputDevice and attachDeviceAttr actions for the named device
-record
controls if the device is recorded (by default) by a recordDevice action
-apply channelName [channelName ... ]
controls if data from the device channel is applied (by default) by applyTake to the param curves attached to the named channel.

Disabling a channel for applyTake cause applyTake to ignore the enable state of all "child" channels -- treating them as disabled.

Flags

apply, device, enable, monitor, query, record
Long name (short name) [argument types] Properties
device(d) string
specifies the device to change
enable(en) boolean
enable (or disable) monitor/record/apply
query(q) boolean
queries monitor/record/apply state
monitor(m) boolean
enables/disables visible update for the device (default)
record(rec) boolean
enable/disable "recordDevice" device recording
apply(a) string...
enable/disable "applyTake" for the specified channel(s)

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


None

Related

applyTake, defineDataServer, defineVirtualDevice, filter, movIn, movOut, readTake, recordDevice, writeTake

Python examples

import maya.cmds as cmds

# Enables all assignInputDevice and attachDeviceAttr actions for the
# device named "clock"
cmds.enableDevice( enable=True, d='clock' )

# Stops applyTake (with no arguments) from updating param curves
# attached to the minutes  and hours channels of device named "clock"
cmds.enableDevice( 'minutes', 'hours', enable=False, d='clock', apply=True )

  

Return to Autodesk Index


Your Ad Here