Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

undo

undo is undoable, NOT queryable, and NOT editable.

Takes the most recent command from the undo list and undoes it.

Return value

None

Related

flushUndo, redo, undoInfo

MEL examples

// In this particular example, each line needs to be executed
// separately one after the other. Executing lines separately
// guaranties that commands are properly registered in the undo
// stack.

polyCube;
// Result: pCube1 polyCube1 //

polySphere;
// Result: pSphere1 polySphere1 //

undo;
// Undo: polySphere; //

undo;
// Undo: polyCube; //