pymel.core.animation.enableDevice¶
- enableDevice(*args, **kwargs)¶
Sets (or queries) the device enable state for actions involving the device. -monitoraffects all assignInputDevice and attachDeviceAttr actions for the named device-recordcontrols 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 childchannels – treating them as disabled. In query mode, return type is based on queried flag.
Flags:
Long Name / Short Name Argument Types Properties apply / a bool enable/disable applyTakefor the specified channel(s) device / d unicode specifies the device to change enable / en bool enable (or disable) monitor/record/apply monitor / m bool enables/disables visible update for the device (default) record / rec bool enable/disable recordDevicedevice recording Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.enableDevice
Example:
import pymel.core as pm # Enables all assignInputDevice and attachDeviceAttr actions for the # device named "clock" pm.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" pm.enableDevice( 'minutes', 'hours', enable=False, d='clock', apply=True )