Description
Optional. Fired when a custom command is being undone. The return value is ignored.
![]()
|
This callback is only supported in the C++ API (no support for scripting). |
Applies To
Syntax
CStatus <command_name>_Undo( CRef& in_context )
{
...
}<command_name> is the name specified in the call to PluginRegistrar.RegisterCommand, with any spaces converted to underscores.
Parameters
|
Parameter |
Language |
Type |
Description |
|
in_context |
Scripting and C# |
Context.Source returns the Command. |
|
|
C++ |
CRef & |
A reference to the Context object. Context::GetSource returns the Command . |
|
Attribute |
Description |
|
UndoRedoData |
Allows you to retrieve the action to undo from the stack. 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) SICALLBACK SimpleUndoRedoCommand_Undo( CRef& in_ctxt ) { Context ctxt( in_ctxt ); CMoveViewTask* p = (CMoveViewTask*)(CValue::siPtrType)ctxt.GetAttribute(L"UndoRedoData"); p->Undo( ); return CStatus::OK; }
See Also
• Redo
Autodesk Softimage 2011