3ds Max C++ API Reference
IBrushPreset Class Referenceabstract

The interface to a brush preset object, holding parameters for the PainterInterface and other brush tools. More...

#include <IBrushPresets.h>

+ Inheritance diagram for IBrushPreset:

Public Member Functions

virtual ~IBrushPreset ()
 Destructor. More...
 
virtual int PresetID ()=0
 Returns an ID which uniquely identifies this preset. More...
 
virtual void Apply ()=0
 Applies parameters from the preset into the UI, as per activating its toolbar button. More...
 
virtual void Fetch ()=0
 Fetches parameters from the UI into the preset, as per deactivating its toolbar button. More...
 
virtual IBrushPresetParamsGetParams (Class_ID contextID)=0
 Returns the parameter set held by the brush preset for a given context. More...
 
virtual int GetNumContexts ()=0
 Returns the number of contexts for which this preset is holding parameters. More...
 
virtual Class_ID GetContextID (int contextIndex)=0
 Translates the index number of a parameter set into the corresponding context ID. More...
 
virtual int GetContextIndex (Class_ID contextID)=0
 Translates the context ID for a parameter set into the corresponding index number. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

The interface to a brush preset object, holding parameters for the PainterInterface and other brush tools.

The interface to Brush Preset objects. A brush preset corresponds to a button on the brush preset toolbar, or a row listed in the brush preset manager dialog. A preset holds one set of parameters for each brush preset context registered with the manager. Applying or fetching a preset will apply or fetch parameters for each currently active context. The context and parameter objects are implemented by plug-ins, but the presets holding the parameter objects are implemented by the system.

Constructor & Destructor Documentation

◆ ~IBrushPreset()

virtual ~IBrushPreset ( )
inlinevirtual

Destructor.

46 {;}

Member Function Documentation

◆ PresetID()

virtual int PresetID ( )
pure virtual

Returns an ID which uniquely identifies this preset.

Presets have an ID number unique from other presets at any given time; however if a preset is deleted, its ID number may be reassigned to other presets created later.

◆ Apply()

virtual void Apply ( )
pure virtual

Applies parameters from the preset into the UI, as per activating its toolbar button.

For each active brush preset context, the corresponding set of parameters held by the preset is applied via ApplyParams().

◆ Fetch()

virtual void Fetch ( )
pure virtual

Fetches parameters from the UI into the preset, as per deactivating its toolbar button.

For each active brush preset context, the corresponding set of parameters held by the preset is fetched via FetchParams().

◆ GetParams()

virtual IBrushPresetParams* GetParams ( Class_ID  contextID)
pure virtual

Returns the parameter set held by the brush preset for a given context.

Parameters
[in]contextIDThe ID of the context

◆ GetNumContexts()

virtual int GetNumContexts ( )
pure virtual

Returns the number of contexts for which this preset is holding parameters.

◆ GetContextID()

virtual Class_ID GetContextID ( int  contextIndex)
pure virtual

Translates the index number of a parameter set into the corresponding context ID.

Parameters
[in]contextIndexThe index of the parameter set
Returns
The context ID for the parameter set, or Class_ID(0,0) if the index is out of range

◆ GetContextIndex()

virtual int GetContextIndex ( Class_ID  contextID)
pure virtual

Translates the context ID for a parameter set into the corresponding index number.

Parameters
[in]contextIDThe ID of the context
Returns
The index of the parameter set, or -1 if the preset has no parameters for the given context