3ds Max C++ API Reference
IGameProperty Class Referenceabstract

Main property definition. More...

#include <IGameProperty.h>

+ Inheritance diagram for IGameProperty:

Public Member Functions

virtual ~IGameProperty ()
 Destructor. More...
 
virtual const MCHARGetName ()=0
 The name of the Property. More...
 
virtual bool IsPBlock2 ()=0
 Check if the parameter is a IParamBlock2 based. More...
 
virtual bool IsPropAnimated ()=0
 Check if the parameter animated. More...
 
virtual IGameControlGetIGameControl ()=0
 The controller for the Property. More...
 
virtual IParamBlock2GetMaxParamBlock2 ()=0
 Direct access to the IParamBlock2. More...
 
virtual IParamBlockGetMaxParamBlock ()=0
 Direct access to the IParamBlock. More...
 
virtual bool IsParamBlock ()=0
 Check if the parameter is IParamBlock or IParamBlock2 based. More...
 
virtual PropType GetType ()=0
 The data type of the Property. More...
 
virtual bool IsParameterSupported ()=0
 Check if User Parameter has a entry in the IGameProp.xml file. More...
 
virtual int GetParamIndex ()=0
 The index of the parameter. More...
 
virtual ParamID GetParamID ()=0
 The ParamID of the parameter. More...
 
virtual bool GetPropertyValue (float &f, TimeValue t=TIME_NegInfinity, bool p=false)=0
 Access to the actual Parameter Data. More...
 
virtual bool GetPropertyValue (int &i, TimeValue t=TIME_NegInfinity)=0
 Access to the actual Parameter Data. More...
 
virtual bool GetPropertyValue (Point3 &p, TimeValue t=TIME_NegInfinity)=0
 Access to the actual Parameter Data. More...
 
virtual bool GetPropertyValue (Point4 &p, TimeValue t=TIME_NegInfinity)=0
 Access to the actual Parameter Data This function is only available in 3ds Max 6.0 and above More...
 
virtual bool GetPropertyValue (const MCHAR *&v, TimeValue t=TIME_NegInfinity)=0
 Access to the actual Parameter Data
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

Main property definition.

IGameProperty provides a wrapper around the standard 3ds Max ParamBlock system. It works for both IParamBlock and IParamBlock2, all paramblocks parameters are supported directly. It provides access to IGameControl and also data access for floats, ints, strings, etc. It performs the type checking, so the Paramblock system will not assert in case of the wrong data type requested. The access to User Properties is provided by look up from the IGameProp.xml file.

Constructor & Destructor Documentation

◆ ~IGameProperty()

virtual ~IGameProperty ( )
inlinevirtual

Destructor.

62 {;}

Member Function Documentation

◆ GetName()

virtual const MCHAR* GetName ( )
pure virtual

The name of the Property.

The name as defined in MAXScript or User Property defined in IGameProp.xml file

Returns
The parameter name

◆ IsPBlock2()

virtual bool IsPBlock2 ( )
pure virtual

Check if the parameter is a IParamBlock2 based.

Returns
TRUE if IParamBlock2, FALSE if IParamBlock

◆ IsPropAnimated()

virtual bool IsPropAnimated ( )
pure virtual

Check if the parameter animated.

Use this check to determing whether or not to access the controller

Returns
TRUE if animated

◆ GetIGameControl()

virtual IGameControl* GetIGameControl ( )
pure virtual

The controller for the Property.

Returns
A pointer to IGameControl

◆ GetMaxParamBlock2()

virtual IParamBlock2* GetMaxParamBlock2 ( )
pure virtual

Direct access to the IParamBlock2.

Returns
a pointer to IParamBlock2

◆ GetMaxParamBlock()

virtual IParamBlock* GetMaxParamBlock ( )
pure virtual

Direct access to the IParamBlock.

Returns
a pointer to IParamBlock

◆ IsParamBlock()

virtual bool IsParamBlock ( )
pure virtual

Check if the parameter is IParamBlock or IParamBlock2 based.

Specifies whether this parameter is based on either IParamBlock or IParamBlock2. This is useful as some IGameProperties are based on Non paramblocks. For example node/user data is accessed as an IGame Property but in 3ds Max has no Paramblock representation

Returns
TRUE if it is based on a either IParamBlock or IParamBlock2.

◆ GetType()

virtual PropType GetType ( )
pure virtual

The data type of the Property.

This is used to find out the data type of the property, so the correct GetPropertyValue method can be used

Returns
The data type. Returned value corresponds to PropType enumeration.
See also
PropType

◆ IsParameterSupported()

virtual bool IsParameterSupported ( )
pure virtual

Check if User Parameter has a entry in the IGameProp.xml file.

All parameter blocks parameters are supported directly. Use this check to decide whether a User Property is defined in the IGameProp.xml file

Returns
True if User Parameter has a entry in the IGameProp.xml file

◆ GetParamIndex()

virtual int GetParamIndex ( )
pure virtual

The index of the parameter.

Replacement for the old GetParamBlockIndex method. This method gets the actual index of the parameter as used by the Parameter block system. The Parameter block system treats ParamID's and their related indexes very differently. Therefore incorrectly mixing Parameter integer index's and and ParamID's can cause very subtle and difficult to find bugs. Previous implementations of the old GetParamBlockIndex method returned a ParamID cast to an int which was incorrect (If the data was based off of Parameter Block 2). Fixing it would cause silent behavior changes which may have gone unnoticed. Therefore this method was introduced to forcefully clarify the difference between accessing the ParamID versus the index of the Parameter.

Returns
The index in the parameter block

◆ GetParamID()

virtual ParamID GetParamID ( )
pure virtual

The ParamID of the parameter.

This replaces the old method GetParamBlockIndex which previously had incorrect behavior.

Returns
The ParamID of the parameter, not the index.

◆ GetPropertyValue() [1/5]

virtual bool GetPropertyValue ( float &  f,
TimeValue  t = TIME_NegInfinity,
bool  p = false 
)
pure virtual

Access to the actual Parameter Data.

Parameters
&fThe float to receive the data
tThe time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
pThe flag indicating if percent fraction value (TYPE_PCNT_FRAC) should be converted (0.1 to 10), default:false
Returns
TRUE if succesful

◆ GetPropertyValue() [2/5]

virtual bool GetPropertyValue ( int i,
TimeValue  t = TIME_NegInfinity 
)
pure virtual

Access to the actual Parameter Data.

Parameters
&iThe int to receive the data
tThe time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns
TRUE if succesful

◆ GetPropertyValue() [3/5]

virtual bool GetPropertyValue ( Point3 p,
TimeValue  t = TIME_NegInfinity 
)
pure virtual

Access to the actual Parameter Data.

Parameters
&pThe Point3 to receive the data
tThe time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns
TRUE if succesful

◆ GetPropertyValue() [4/5]

virtual bool GetPropertyValue ( Point4 p,
TimeValue  t = TIME_NegInfinity 
)
pure virtual

Access to the actual Parameter Data This function is only available in 3ds Max 6.0 and above

Parameters
&pThe Point4 to receive the data
tThe time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns
TRUE if succesful

◆ GetPropertyValue() [5/5]

virtual bool GetPropertyValue ( const MCHAR *&  v,
TimeValue  t = TIME_NegInfinity 
)
pure virtual

Access to the actual Parameter Data

Parameters
vThe MCHAR to receive the data
tThe time to retrieve the value, defaulted to the static frame. This is set by IGameScene::SetStaticFrame
Returns
TRUE if successful