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

This class is used as a helper class to remove a binding modifier when the node it is bound to deleted. More...

#include <C:/adskgit/3dsmax/3dsmax/3dswin/src/maxsdk/include/object.h>

Inheritance diagram for BindingModifierSceneRemove:

Public Member Functions

CoreExport BindingModifierSceneRemove ()
CoreExport ~BindingModifierSceneRemove ()
CoreExport void AddModifierToProcess (Modifier *mod)
 This method potentially adds the binding modifier to the list of modifiers to modifiers to be removed from nodes.

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

This class is used as a helper class to remove a binding modifier when the node it is bound to deleted.

For example, if create a Bend WSM node and use 'Bind to Space Warp' to bind another node to the Bend WSM node, a 'Bend Binding (WSM)' modifier is placed on that node. If then delete the Bend WSM node, this class is used to cause the 'Bend Binding (WSM)' modifier to be automatically removed. The SimpleWSMMod class uses an instance of this class, as does the BombMod class which is used as a binding modifier but does not derive from SimpleWSMMod. Example usage in BombMod class:

static BindingModifierSceneRemove sBindingModifierSceneRemove;
RefResult BombMod::NotifyRefChanged(const Interval& changeInt, RefTargetHandle hTarget,
PartID& partID, RefMessage message, BOOL propagate)
{
switch ( message ) {
// This means the Bomb node is being deleted. As a result,
// we null our references
if (hTarget == obRef)
obRef = NULL;
else if (hTarget == nodeRef)
{
nodeRef = NULL;
sBindingModifierSceneRemove.AddModifierToProcess(this);
}
};
return REF_SUCCEED;
}
#define NULL
Definition autoptr.h:18
CoreExport BindingModifierSceneRemove()
CoreExport void AddModifierToProcess(Modifier *mod)
This method potentially adds the binding modifier to the list of modifiers to modifiers to be removed...
Definition interval.h:36
#define REFMSG_TARGET_DELETED
This message is sent when a ReferenceTarget is deleted.
Definition ref.h:230
unsigned int RefMessage
The message passed to notify and evaluate.
Definition ref.h:202
ULONG_PTR PartID
This is NOT just a bitmask, the parameter is also used to stuff pointers, hence the ULONG_PTR.
Definition ref.h:51
RefResult
Return codes for reference handling and message processing methods.
Definition ref.h:749
@ REF_SUCCEED
The operation succeeded.
Definition ref.h:757
@ REF_AUTO_DELETE
Return this from your implementation of ReferenceMaker::NotifyRefChanged() in response to a REFMGS_TA...
Definition ref.h:770
ReferenceTarget * RefTargetHandle
Creates a typename for ReferenceTarget pointers.
Definition ref.h:802

Constructor & Destructor Documentation

◆ BindingModifierSceneRemove()

◆ ~BindingModifierSceneRemove()

Member Function Documentation

◆ AddModifierToProcess()

CoreExport void AddModifierToProcess ( Modifier * mod)

This method potentially adds the binding modifier to the list of modifiers to modifiers to be removed from nodes.

The modifier is added to the list if 3dsmax is in the middle of deleting one or more nodes, and 3dsmax is not in the middle of an undo or redo. The list of modifiers is processed at the end of deleting the nodes.

Parameters
modThe binding modifier.