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 “child” channels – 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 ../../../_images/create.gif ../../../_images/query.gif
 

enable/disable “applyTake” for the specified channel(s)Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

device (d) unicode ../../../_images/create.gif ../../../_images/query.gif
 
specifies the device to change
enable (en) bool ../../../_images/create.gif ../../../_images/query.gif
 
enable (or disable) monitor/record/apply
monitor (m) bool ../../../_images/create.gif ../../../_images/query.gif
 
enables/disables visible update for the device (default)
record (rec) bool ../../../_images/create.gif ../../../_images/query.gif
 
enable/disable “recordDevice” device recording

Derived from mel command maya.cmds.enableDevice

Example:

import pymel.core as pm

import maya.cmds as cmds

# 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 )

Previous topic

pymel.core.animation.effector

Next topic

pymel.core.animation.filterCurve

Core

Core Modules

Other Modules

This Page