3ds Max C++ API Reference
Loading...
Searching...
No Matches
AppendGizmoRestore Class Reference

#include <sfx.h>

+ Inheritance diagram for AppendGizmoRestore:

Public Member Functions

 AppendGizmoRestore (SpecialFX *f, INode *n)
 
void Redo ()
 
void Restore (int isUndo)
 
MSTR Description ()
 
- Public Member Functions inherited from RestoreObj
 RestoreObj ()
 
virtual ~RestoreObj ()
 
virtual void Restore (int isUndo)=0
 
virtual void Redo ()=0
 
virtual int Size ()
 
virtual void EndHold ()
 
virtual MSTR Description ()
 
virtual bool MarkSceneDirtyForSave () const
 
virtual INT_PTR Execute (int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0, ULONG_PTR arg3=0)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor.
 
virtual UtilExport BaseInterfaceGetInterface (Interface_ID id)
 
template<class InterfaceType >
InterfaceType * GetTypedInterface ()
 

Public Attributes

SpecialFXfx
 
INodenode
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown.
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned.
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen.
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class RestoreObj, Class Atmospheric, Class Effect, Class SpecialFX, Class INode.

Description:
This class enables implementing undo of Gizmo assignment in Atmosphere and Effects classes. This class provides implementations of the RestoreObj methods. An instance of this class can be put on the Hold stack when a Gizmo is appended. For example:
Definition: sfx.h:338
INode * node
Definition: sfx.h:341
CoreExport bool Put(RestoreObj *obj)
The developer calls this method to register a new restore object with the system.
CoreExport int Holding()
Indicates if theHold.Begin() has been called.
CoreExport Hold theHold
All methods of this class are implemented by the System.
Data Members:
SpecialFX *fx;

Points to the Atmosphere of Effect.

INode *node;

Points to the gizmo node.

Constructor & Destructor Documentation

◆ AppendGizmoRestore()

AppendGizmoRestore ( SpecialFX f,
INode n 
)
inline
Remarks
Constructor. The data members are initalized to the values pased.
344{ fx= f; node = n; }
SpecialFX * fx
Definition: sfx.h:340

Member Function Documentation

◆ Redo()

void Redo ( )
inlinevirtual
Remarks
This method is called when the user selects the Redo command. The developer should restore the database to the state prior to the last Undo command.

Implements RestoreObj.

345{ fx->AppendGizmo(node); }
virtual void AppendGizmo(INode *node)
Definition: sfx.h:277

◆ Restore()

void Restore ( int  isUndo)
inlinevirtual
Remarks
The developer implements this method to restore the state of the database to as it was when theHold.Put() was called with this restore object.

Regardless of the value of the isUndo parameter, the method must restore the state of the scene to the one it was in when theHold.Put() was called with this restore object.

RestoreObj::Restore and RestoreObj::Redo may be called several times in a row: these methods must protect against any problems that may arise because of this, such as trying to undo multiple times in a row what has been undone already.
Parameters
isUndoNonzero if Restore() is being called in response to the Undo command; otherwise zero. If isUndo is nonzero, the developer needs to save whatever data they need to allow the user to redo the operation.

Implements RestoreObj.

346{ fx->DeleteGizmo(fx->NumGizmos()-1); }
virtual void DeleteGizmo(int i)
Definition: sfx.h:269
virtual int NumGizmos()
Definition: sfx.h:255

◆ Description()

MSTR Description ( )
inlinevirtual
Remarks
This method is used internally to 3ds Max in debugging only. It is used to display a symbolic name for the restore object.
Returns
The name of the restore object.
Default Implementation:
{ return MSTR(_M("---")); }

Reimplemented from RestoreObj.

347{ return MSTR(_M("AppendGizmoRestore")); }
#define _M(x)
Used to wrap string literals.
Definition: strbasic.h:67
WStr MSTR
Definition: strclass.h:1071

Member Data Documentation

◆ fx

SpecialFX* fx

◆ node

INode* node