XSIApplication.CloseUndo

Introduced

v10.0 (2012)

Categories

Undo

Description

Closes an opened undo complex previously opened with XSIApplication.OpenUndo. CloseUndo calls are ignored if they don't match an open complex. Note:Undo complexes left open due to a missing CloseUndo call may lead to undo/redo problems. However, Softimage will try to close automatically any open undo complexes when possible.

Scripting Syntax

XSIApplication.CloseUndo();

Examples

Python Example

#
# Simple example to deomonstrate OpenUndo/CloseUndo
#
Application.OpenUndo("my undo complex")
Application.CreatePrim("Cone", "MeshSurface", "", "")
Application.CreatePrim("Grid", "MeshSurface", "", "")
Application.CreatePrim("Cube", "MeshSurface", "", "")
Application.CloseUndo()
Application.Undo("")    # my undo complex
Application.Redo("")    # my undo complex