Your Ad Here

Go to: Synopsis. Flags. Return value. Related. Python examples.

Synopsis

undoInfo([infinity=boolean], [length=int], [query=boolean], [redoName=boolean], [redoQueueEmpty=boolean], [state=boolean], [stateWithoutFlush=boolean], [undoName=boolean], [undoQueueEmpty=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

undoInfo is undoable, queryable, and editable.

This command controls the undo/redo parameters.

Flags

infinity, length, query, redoName, redoQueueEmpty, state, stateWithoutFlush, undoName, undoQueueEmpty
Long name (short name) [argument types] Properties
state(st) boolean createquery
Turns undo/redo on or off.

In query mode, this flag needs a value.

infinity(infinity) boolean createquery
Set the queue length to infinity.

In query mode, this flag needs a value.

length(l) int createquery
Specifies the number of items in the undo queue. The infinity flag overrides this one.

In query mode, this flag needs a value.

query(q) boolean query
Allows you to query one of the above values.

In query mode, this flag needs a value.

undoName(un) boolean query
Returns what will be undone (if anything)

In query mode, this flag needs a value.

redoName(rn) boolean query
Returns what will be redone (if anything)

In query mode, this flag needs a value.

undoQueueEmpty(uqe) boolean query
Return true if the undo queue is empty. Return false if there is at least one command in the queue to be undone.

In query mode, this flag needs a value.

redoQueueEmpty(rqe) boolean query
Return true if the redo queue is empty. Return false if there is at least one command in the queue to be redone.

In query mode, this flag needs a value.

stateWithoutFlush(swf) boolean createquery
Turns undo/redo on or off without flushing the queue.

In query mode, this flag needs a value.


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.

Return value


string If querying undoName or redoName

int If querying state, infinity, or length

Related

flushUndo, redo, undo

Python examples

import maya.cmds as cmds

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

  

Return to Autodesk Index


Your Ad Here