3ds Max C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DeleteCustAttribContainerAndNoteTracksProc Class Reference

A RefEnumProc to remove custom attribute containers and note tracks from a RefMaker and its references. More...

#include <ref.h>

+ Inheritance diagram for DeleteCustAttribContainerAndNoteTracksProc:

Public Member Functions

int proc (ReferenceMaker *m)
 This method is called once for each element in the reference hierarchy.
 
- Public Member Functions inherited from RefEnumProc
virtual int proc (ReferenceMaker *rm)=0
 This method is called once for each element in the reference hierarchy.
 
virtual CoreExport bool CheckIfAndSetAsVisited (ReferenceMaker *rmaker)
 This method sets and checks whether a ReferenceMaker was visited.
 
CoreExport void BeginEnumeration (bool preventDuplicatesViaFlag=true)
 This method prepares the RefEnumProc instance for enumeration.
 
CoreExport void EndEnumeration ()
 This method finalizes the RefEnumProc instance after enumeration.
 

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.
 
- Protected Member Functions inherited from RefEnumProc
CoreExport RefEnumProc ()
 
virtual CoreExport ~RefEnumProc ()
 
 RefEnumProc (const RefEnumProc &)
 
RefEnumProcoperator= (const RefEnumProc &rhs)
 

Detailed Description

A RefEnumProc to remove custom attribute containers and note tracks from a RefMaker and its references.

An instance of this class should be used if a session static RefMaker instance adds itself to TrackView, and re-adds itself to TrackView on a file reset. If this occurs, any custom attributes or note tracks that were applied to the static instance will still be present after the file reset. An instance of this class can be used to remove custom attributes or note tracks from the instance and its references. Example:

MyClass::MyClass()
{
RegisterNotification(PostResetCallback, this, NOTIFY_POST_SCENE_RESET);
AddToRefHierarchy();
}
void MyClass::PostResetCallback(void* param, NotifyInfo* info)
{
{
DeleteCustAttribContainerAndNoteTracksProc deleteCustAttribContainerAndNoteTracksProc;
static_cast<MyClass*>(param)->EnumRefHierarchy(deleteCustAttribContainerAndNoteTracksProc, false, false, false, false);
}
static_cast<MyClass*>(param)->AddToRefHierarchy();
}
A RefEnumProc to remove custom attribute containers and note tracks from a RefMaker and its reference...
Definition: ref.h:3052
#define NOTIFY_SYSTEM_POST_RESET
Sent after 3ds Max system is reset.
Definition: notify.h:132
#define NOTIFY_POST_SCENE_RESET
Sent just after deleting all refs in existing scene.
Definition: notify.h:739
CoreExport int RegisterNotification(NOTIFYPROC proc, void *param, int code)
3ds Max supports a system where a plug-in can ask to receive a callback when certain events occur.
Definition: notifyParams.h:83
NotifyCode intcode
Definition: notifyParams.h:84

Member Function Documentation

◆ proc()

int proc ( ReferenceMaker rm)
inlinevirtual

This method is called once for each element in the reference hierarchy.

This method is called once for each element in the reference hierarchy. The return value specifies whether continue processing the references, indirect references, and custom attributes of the refmaker; whether to skip processing of those and continue to the next element, or whether to terminate enumeration. Typically the return value will be REF_ENUM_CONTINUE.

Parameters
rm- A pointer to the reference maker to this item.
Returns
One of the following values:
  • REF_ENUM_CONTINUE: This continues the enumeration
  • REF_ENUM_HALT: This stops the enumeration.
  • REF_ENUM_SKIP: Reference Makers can hold multiple References. In certain instances you may not want to travel down all of the "branches". By returning REF_ENUM_SKIP from this method you tell the enumerator to not enumerate the current Reference Maker's references but not to halt the enumeration completely.

Implements RefEnumProc.

3055 {
3056 if (m)
3057 {
3058 m->DeleteCustAttribContainer();
3059 m->DeleteAllNoteTracks();
3060 m->ClearAllAppData();
3061 }
3062 return REF_ENUM_CONTINUE;
3063 }
#define REF_ENUM_CONTINUE
Halts enumeration.
Definition: ref.h:2425