TermUndoRedo

Description

Optional. Fired when a custom command undo event is removed from the Softimage undo stack. This callback is typically used to release any memory required for undoing this command. The return value is ignored.

 

This callback is only supported in the C++ API (no support for scripting).

Applies To

Custom Commands

Syntax

CStatus <command_name>_TermUndoRedo( CRef& in_context ) 
{ 
   ... 
}

<command_name> is the name specified in the call to PluginRegistrar.RegisterCommand, with any spaces removed.

Parameters

Parameter

Language

Type

Description

in_context

Scripting and C#

Context

Context.Source returns the Command.

C++

CRef &

A reference to the Context object.

Context::GetSource returns the Command .

Context Attributes

Attribute

Description

UndoRedoData

Allows you to release the memory allocated in the Execute callback. See Undoing and Redoing Custom Commands.

Examples

C++ API Example

// Taken from the SimpleUndoRedoCommand example (for the complete example, 
// click the link in the See Also section below)
XSIPLUGINCALLBACK CStatus SimpleUndoRedoCommand_TermUndoRedo( CRef& in_ctxt )
{
   Context ctxt( in_ctxt );

   CMoveViewTask* p = (CMoveViewTask*)(CValue::siPtrType)ctxt.GetAttribute(L"UndoRedoData");
   delete p;

   return CStatus::OK;
}

See Also

Command Callbacks

Execute (Command)

Init (Command)

Redo

Undo

Custom Command Examples



Autodesk Softimage v7.5