Undo Class

From TouchDesigner Documentation
Jump to: navigation, search

A class to enable and disable undo functionality. Undo blocks can be created during python callbacks. At the end of callbacks, any dangling undo blocks will be terminated.


Members

globalStatebool :

Is global undo enabled or not.

redoStacklist (Read Only):

A list of names for redo operations available.

statebool (Read Only):

Is undo enabled or not.

undoStacklist (Read Only):

A list of names for undo operations available.

Methods

startBlock(name, enable=True)None:

Start a named undo block.

clear()None:

Clear undo and redo stack. This will terminate any current undo blocks.

addCallback(callback, info=None)None:

Start a named undo block.

  • callback - user defined callback in the form of callback(isUndo, info)
  • info - this argument will be passed back to user in the callback

redo()None:

Redo the next operation. This will terminate any current undo blocks.

undo()None:

Undo the last operation. This will terminate any current undo blocks.

endBlock()None:

Terminate an undo block.

TouchDesigner Build: