3ds Max C++ API Reference
MarketDefaults Class Referenceabstract

This class manages the default settings of a range of 3ds Max features. More...

#include <marketDefaults.h>

+ Inheritance diagram for MarketDefaults:

Classes

class  Range
 

Public Types

typedef bool(* FloatValidator) (float &)
 
typedef bool(* IntValidator) (int &)
 
typedef bool(* Point3Validator) (Point3 &)
 
typedef bool(* Point4Validator) (Point4 &)
 
typedef bool(* StringValidator) (MSTR &)
 
typedef bool(* AnimatableValidator) (Animatable *&)
 
typedef bool(* ClassIDValidator) (Class_ID &)
 

Public Member Functions

virtual CoreExport ~MarketDefaults ()
 
virtual int GetInt (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, int defaultValue, IntValidator validator=NULL, int dimension=DIM_NONE)=0
 
int GetTime (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, int defaultValue, IntValidator validator=NULL)
 
virtual float GetFloat (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, float defaultValue, FloatValidator validator=NULL, int dimension=DIM_NONE)=0
 
float GetAngle (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, float defaultValue, FloatValidator validator=NULL)
 
float GetPercentage (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, float defaultValue, FloatValidator validator=NULL)
 
float GetWorld (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, float defaultValue, FloatValidator validator=NULL)
 
float GetColorChannel (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, float defaultValue, FloatValidator validator=NULL)
 
virtual Point3 GetPoint3 (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Point3 &defaultValue, Point3Validator validator=NULL, int dimension=DIM_NONE)=0
 
Point3 GetRGBA (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Point3 &defaultValue, Point3Validator validator=NULL)
 
virtual Point4 GetPoint4 (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Point4 &defaultValue, Point4Validator validator=NULL, int dimension=DIM_NONE)=0
 
Point4 GetFRGBA (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Point4 &defaultValue, Point4Validator validator=NULL)
 
virtual MSTR GetString (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const MCHAR *defaultValue, StringValidator validator=NULL)=0
 
virtual Class_ID GetClassID (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Class_ID &defaultID, ClassIDValidator validator=NULL)=0
 
virtual AnimatableCreateInstance (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, SClass_ID superClass, const Class_ID &defaultInstance, AnimatableValidator validator=NULL)=0
 
CoreExport ReferenceTargetCreateRefTarget (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, SClass_ID superClass, const Class_ID &defaultInstance, AnimatableValidator validator=NULL)
 
CoreExport MtlCreateMtl (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Class_ID &defaultInstance, AnimatableValidator validator=NULL)
 
CoreExport TexmapCreateTexmap (SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Class_ID &defaultInstance, AnimatableValidator validator=NULL)
 
virtual bool SectionExists (const MCHAR *section)=0
 
virtual bool SectionExists (SClass_ID sid, const Class_ID &id)=0
 
virtual void SetSectionName (const MCHAR *section)=0
 
virtual void SetSectionName (SClass_ID sid, const Class_ID &id)=0
 
virtual const MCHARGetSectionName ()=0
 
virtual void DeleteSection (const MCHAR *section)=0
 
virtual void DeleteSection (SClass_ID sid, const Class_ID &id)=0
 
virtual bool KeyExists (const MCHAR *key)=0
 
virtual bool DeleteKey (const MCHAR *key)=0
 
virtual bool PutInt (const MCHAR *key, int val)=0
 
virtual bool PutIntArray (const MCHAR *key, int ct, const int *array)=0
 
virtual bool PutFloat (const MCHAR *key, float val)=0
 
virtual bool PutFloatArray (const MCHAR *key, int ct, const float *array)=0
 
virtual bool PutString (const MCHAR *key, const MCHAR *str)=0
 
virtual bool GetInt (const MCHAR *key, int &val)=0
 
virtual bool GetIntArray (const MCHAR *key, int &ct, int *array, int arrayCt)=0
 
virtual bool GetFloat (const MCHAR *key, float &val)=0
 
virtual bool GetFloatArray (const MCHAR *key, int &ct, float *array, int arrayCt)=0
 
virtual bool GetString (const MCHAR *key, MCHAR *buf, int bufSize)=0
 

Static Public Member Functions

static CoreExport bool CheckNULL (Animatable *&obj)
 
static CoreExport bool CheckNULL (MSTR &str)
 
static CoreExport bool CheckNULL (Class_ID &id)
 
- 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

This class manages the default settings of a range of 3ds Max features.

Description:
A set of default settings can be saved under a certain name. The different sets are then presented by 3ds Max to users to choose from. 3rd party plug-ins can add their own deafults to the current set of settings, but cannot create their own sets.

Member Typedef Documentation

◆ FloatValidator

typedef bool(* FloatValidator) (float &)

◆ IntValidator

typedef bool(* IntValidator) (int &)

◆ Point3Validator

typedef bool(* Point3Validator) (Point3 &)

◆ Point4Validator

typedef bool(* Point4Validator) (Point4 &)

◆ StringValidator

typedef bool(* StringValidator) (MSTR &)

◆ AnimatableValidator

typedef bool(* AnimatableValidator) (Animatable *&)

◆ ClassIDValidator

typedef bool(* ClassIDValidator) (Class_ID &)

Constructor & Destructor Documentation

◆ ~MarketDefaults()

virtual CoreExport ~MarketDefaults ( )
virtual

Member Function Documentation

◆ CheckNULL() [1/3]

static CoreExport bool CheckNULL ( Animatable *&  obj)
static

◆ CheckNULL() [2/3]

static CoreExport bool CheckNULL ( MSTR str)
static

◆ CheckNULL() [3/3]

static CoreExport bool CheckNULL ( Class_ID id)
static

◆ GetInt() [1/2]

virtual int GetInt ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
int  defaultValue,
IntValidator  validator = NULL,
int  dimension = DIM_NONE 
)
pure virtual

◆ GetTime()

int GetTime ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
int  defaultValue,
IntValidator  validator = NULL 
)
inline
120  {
121  return GetInt(objectSuperClass, objectClass, name, defaultValue, validator, DIM_TIME);
122  }
virtual int GetInt(SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, int defaultValue, IntValidator validator=NULL, int dimension=DIM_NONE)=0
@ DIM_TIME
For time units.
Definition: ParamDimension.h:27

◆ GetFloat() [1/2]

virtual float GetFloat ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
float  defaultValue,
FloatValidator  validator = NULL,
int  dimension = DIM_NONE 
)
pure virtual

◆ GetAngle()

float GetAngle ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
float  defaultValue,
FloatValidator  validator = NULL 
)
inline
140  {
141  return GetFloat(objectSuperClass, objectClass, name, defaultValue, validator, DIM_ANGLE);
142  }
virtual float GetFloat(SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, float defaultValue, FloatValidator validator=NULL, int dimension=DIM_NONE)=0
@ DIM_ANGLE
For Angular values.
Definition: ParamDimension.h:21

◆ GetPercentage()

float GetPercentage ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
float  defaultValue,
FloatValidator  validator = NULL 
)
inline
151  {
152  return GetFloat(objectSuperClass, objectClass, name, defaultValue, validator, DIM_PERCENT);
153  }
@ DIM_PERCENT
For Percentage with a range of 0-100.
Definition: ParamDimension.h:24

◆ GetWorld()

float GetWorld ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
float  defaultValue,
FloatValidator  validator = NULL 
)
inline
162  {
163  return GetFloat(objectSuperClass, objectClass, name, defaultValue, validator, DIM_WORLD);
164  }
@ DIM_WORLD
For spatial value.
Definition: ParamDimension.h:20

◆ GetColorChannel()

float GetColorChannel ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
float  defaultValue,
FloatValidator  validator = NULL 
)
inline
173  {
174  return GetFloat(objectSuperClass, objectClass, name, defaultValue, validator, DIM_COLOR255);
175  }
@ DIM_COLOR255
For colors with a range of 0-255.
Definition: ParamDimension.h:23

◆ GetPoint3()

virtual Point3 GetPoint3 ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Point3 defaultValue,
Point3Validator  validator = NULL,
int  dimension = DIM_NONE 
)
pure virtual

◆ GetRGBA()

Point3 GetRGBA ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Point3 defaultValue,
Point3Validator  validator = NULL 
)
inline
193  {
194  return GetPoint3(objectSuperClass, objectClass, name, defaultValue, validator, DIM_COLOR255);
195  }
virtual Point3 GetPoint3(SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Point3 &defaultValue, Point3Validator validator=NULL, int dimension=DIM_NONE)=0

◆ GetPoint4()

virtual Point4 GetPoint4 ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Point4 defaultValue,
Point4Validator  validator = NULL,
int  dimension = DIM_NONE 
)
pure virtual

◆ GetFRGBA()

Point4 GetFRGBA ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Point4 defaultValue,
Point4Validator  validator = NULL 
)
inline
213  {
214  return GetPoint4(objectSuperClass, objectClass, name, defaultValue, validator, DIM_COLOR);
215  }
virtual Point4 GetPoint4(SClass_ID objectSuperClass, const Class_ID &objectClass, const MCHAR *name, const Point4 &defaultValue, Point4Validator validator=NULL, int dimension=DIM_NONE)=0
@ DIM_COLOR
For colors with a range of 0-1.
Definition: ParamDimension.h:22

◆ GetString() [1/2]

virtual MSTR GetString ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const MCHAR defaultValue,
StringValidator  validator = NULL 
)
pure virtual

◆ GetClassID()

virtual Class_ID GetClassID ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Class_ID defaultID,
ClassIDValidator  validator = NULL 
)
pure virtual

◆ CreateInstance()

virtual Animatable* CreateInstance ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
SClass_ID  superClass,
const Class_ID defaultInstance,
AnimatableValidator  validator = NULL 
)
pure virtual

◆ CreateRefTarget()

CoreExport ReferenceTarget* CreateRefTarget ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
SClass_ID  superClass,
const Class_ID defaultInstance,
AnimatableValidator  validator = NULL 
)

◆ CreateMtl()

CoreExport Mtl* CreateMtl ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Class_ID defaultInstance,
AnimatableValidator  validator = NULL 
)

◆ CreateTexmap()

CoreExport Texmap* CreateTexmap ( SClass_ID  objectSuperClass,
const Class_ID objectClass,
const MCHAR name,
const Class_ID defaultInstance,
AnimatableValidator  validator = NULL 
)

◆ SectionExists() [1/2]

virtual bool SectionExists ( const MCHAR section)
pure virtual

◆ SectionExists() [2/2]

virtual bool SectionExists ( SClass_ID  sid,
const Class_ID id 
)
pure virtual

◆ SetSectionName() [1/2]

virtual void SetSectionName ( const MCHAR section)
pure virtual

◆ SetSectionName() [2/2]

virtual void SetSectionName ( SClass_ID  sid,
const Class_ID id 
)
pure virtual

◆ GetSectionName()

virtual const MCHAR* GetSectionName ( )
pure virtual

◆ DeleteSection() [1/2]

virtual void DeleteSection ( const MCHAR section)
pure virtual

◆ DeleteSection() [2/2]

virtual void DeleteSection ( SClass_ID  sid,
const Class_ID id 
)
pure virtual

◆ KeyExists()

virtual bool KeyExists ( const MCHAR key)
pure virtual

◆ DeleteKey()

virtual bool DeleteKey ( const MCHAR key)
pure virtual

◆ PutInt()

virtual bool PutInt ( const MCHAR key,
int  val 
)
pure virtual

◆ PutIntArray()

virtual bool PutIntArray ( const MCHAR key,
int  ct,
const int array 
)
pure virtual

◆ PutFloat()

virtual bool PutFloat ( const MCHAR key,
float  val 
)
pure virtual

◆ PutFloatArray()

virtual bool PutFloatArray ( const MCHAR key,
int  ct,
const float *  array 
)
pure virtual

◆ PutString()

virtual bool PutString ( const MCHAR key,
const MCHAR str 
)
pure virtual

◆ GetInt() [2/2]

virtual bool GetInt ( const MCHAR key,
int val 
)
pure virtual

◆ GetIntArray()

virtual bool GetIntArray ( const MCHAR key,
int ct,
int array,
int  arrayCt 
)
pure virtual

◆ GetFloat() [2/2]

virtual bool GetFloat ( const MCHAR key,
float &  val 
)
pure virtual

◆ GetFloatArray()

virtual bool GetFloatArray ( const MCHAR key,
int ct,
float *  array,
int  arrayCt 
)
pure virtual

◆ GetString() [2/2]

virtual bool GetString ( const MCHAR key,
MCHAR buf,
int  bufSize 
)
pure virtual