This command takes the string it is given and evaluates it during the next available idle time. It is useful for attaching commands to controls that can change or delete the control.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
evaluateNext (en) | bool | ||
list (ls) | bool | ||
Return a list of the command strings that are currently pending on the idle queue.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
lowestPriority (lp) | bool | ||
|
Derived from mel command maya.cmds.evalDeferred
Example:
import pymel.core as pm
pm.window()
# Result: ui.Window('window1') #
pm.columnLayout()
# Result: ui.ColumnLayout('window1|columnLayout27') #
button = pm.button(label='Delete Me')
pm.button(button, edit=True, command=('pm.evalDeferred("pm.deleteUI(button)")'))
# Result: ui.Button('window1|columnLayout27|button27') #
pm.showWindow()