pymel.core.general.evalDeferred

evalDeferred(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
evaluateNext (en) bool  
   
list (ls) bool ../../../_images/create.gif
 

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 ../../../_images/create.gif
 
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.

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

Previous topic

pymel.core.general.encodeString

Next topic

pymel.core.general.exactWorldBoundingBox

Core

Core Modules

Other Modules

This Page