Go to: Synopsis. Return value. Related. Flags. Python examples.
evalDeferred(
[script]
, [list=boolean], [lowestPriority=boolean])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
evalDeferred is undoable, NOT queryable, and NOT editable.
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.
eval, scriptJob
list, lowestPriority
Long name (short name) |
Argument types |
Properties |
lowestPriority(lp)
|
boolean
|
|
|
Specified that the command to be executed should be deferred with
the lowest priority. That is, it will be executed when no other
idle events are scheduled.
|
|
list(ls)
|
boolean
|
|
|
Return a list of the command strings that are currently pending on
the idle queue.
|
|
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.
|
import maya.cmds as cmds
cmds.window()
cmds.columnLayout()
button = cmds.button(label='Delete Me')
cmds.button(button, edit=True, command=('cmds.evalDeferred("cmds.deleteUI(button)")'))
cmds.showWindow()