pymel.core.system.undoInfo

static system.undoInfo(*args, **kwargs)

This command controls the undo/redo parameters.

Modifications:
  • when state is turned off, also clears pymel’s api undo queue
Flags:
Long name (short name) Argument Types Properties
closeChunk (cck) bool ../../../_images/create.gif
 

Closes the chunk that was opened earlier by openChunk. Once close chunk is called, all undoable operations in the chunk will undo as a single undo operation. Use with CAUTION!! Improper use of this command can leave the undo queue in a bad state.

infinity (infinity) bool ../../../_images/create.gif ../../../_images/query.gif
 
Set the queue length to infinity.
length (l) int ../../../_images/create.gif ../../../_images/query.gif
 
Specifies the number of items in the undo queue. The infinity flag overrides this one.
openChunk (ock) bool ../../../_images/create.gif
 

Opens a chunk so that all undoable operations after this call will fall into the newly opened chunk, until close chunk is called. Once close chunk is called, all undoable operations in the chunk will undo as a single undo operation. Use with CAUTION!! Improper use of this command can leave the undo queue in a bad state.

printQueue (pq) bool ../../../_images/query.gif
 
Prints to the Script Editor the contents of the undo queue.
redoName (rn) unicode ../../../_images/query.gif
 
Returns what will be redone (if anything)
redoQueueEmpty (rqe) bool ../../../_images/query.gif
 
Return true if the redo queue is empty. Return false if there is at least one command in the queue to be redone.
state (st) bool ../../../_images/create.gif ../../../_images/query.gif
 
Turns undo/redo on or off.
stateWithoutFlush (swf) bool ../../../_images/create.gif ../../../_images/query.gif
 
Turns undo/redo on or off without flushing the queue. Flag can have multiple arguments, passed either as a tuple or a list.
undoName (un) unicode ../../../_images/query.gif
 
Returns what will be undone (if anything)
undoQueueEmpty (uqe) bool ../../../_images/query.gif
 
Return true if the undo queue is empty. Return false if there is at least one command in the queue to be undone.

Derived from mel command maya.cmds.undoInfo

Example:

import pymel.core as pm

# Turn undo on, with an infinite queue length
pm.undoInfo( state=True, infinity=True )
# Turn undo on, with a queue length of 200
pm.undoInfo( state=True, infinity=False, length=200 )
# Turn undo off
pm.undoInfo( state=False )
# Query the queue length
pm.undoInfo( q=True, length=True )
# Result: 200 #

Previous topic

pymel.core.system.undo

Next topic

pymel.core.system.unloadPlugin

Core

Core Modules

Other Modules

This Page