The interface for creating, adding, removing and keeping track of meta-data on max Animatables.
Meta-data are custom attributes that contain only a parameter block. In order to create meta-data, you have to create its definition by specify the parameters first. This will give you a meta-data ID. You can then use that ID to add, remove or list meta-data in the scene.
#include <IMetaData.h>
Classes |
|
struct | ParamDescriptor |
A description for a parameter to be used in
a meta-data, and its UI in an eventual rollout. More... |
|
Public Types |
|
enum | ControlAlign { eAlignLeft, eAlignCenter, eAlignRight } |
typedef Class_ID | MetaDataID |
Public Member Functions |
|
virtual MetaDataID | CreateMetaDataDefinition (MCHAR *in_custAttribSetName, MCHAR *in_rollOutName, const Tab< ParamDescriptor > &in_paramDefs, MSTR *out_errMsg=NULL)=0 |
Create a meta-data definition for further
use in meta-data manager functions. |
|
virtual CustAttrib * | AddMetaDataToAnimatable (const MetaDataID &in_metaDataID, Animatable &in_animatable, int in_rank=-1)=0 |
Create a meta-data instance and add it to
the custom attribute container of an animatable. |
|
virtual void | AddMetaDataToAnimatables (const MetaDataID &in_metaDataID, const Tab< Animatable * > &in_animatables, Tab< CustAttrib * > &out_metaData, bool in_shared=false, int in_rank=-1)=0 |
Create meta-data instances and add it to the
custom attribute container of animatables. |
|
virtual bool | RemoveMetaDataFromAnimatable (const MetaDataID &in_metaDataID, Animatable &in_animatable)=0 |
Remove a meta-data from the custom attribute
container of an animatable. |
|
virtual int | MetaDataCount () const =0 |
Returns the number of meta-data in the
scene. |
|
virtual void | GetAllMetaDataOwners (const MetaDataID &in_ID, Tab< Animatable * > &out_owners)=0 |
Finds all owners of meta-data of a given
meta-data ID. |
|
virtual bool | IsMetaDataDefined (const MetaDataID &in_ID) const =0 |
Returns whether a definition exists for a
given meta-data ID. |
|
virtual CustAttrib * | GetMetaData (Animatable &in_animatable, const MetaDataID &in_ID) const =0 |
Checks the existence of meta-data of a given
ID on an animatable. |
|
virtual void | GetAllMetaData (Animatable &in_animatable, Tab< CustAttrib * > &out_metaData) const =0 |
Finds all meta-data on an animatable.
|
|
Static Public Member Functions |
|
static IMetaDataManager * | GetInstance () |
enum ControlAlign |
{ eAlignLeft, eAlignCenter, eAlignRight };
virtual MetaDataID CreateMetaDataDefinition | ( | MCHAR * | in_custAttribSetName, |
MCHAR * | in_rollOutName, | ||
const Tab< ParamDescriptor > & | in_paramDefs, | ||
MSTR * | out_errMsg =
NULL |
||
) | [pure virtual] |
Create a meta-data definition for further use in meta-data manager functions.
The ID returned will allow the user to add or remove meta-data in the scene and to keep track of them.
in_custAttribSetName | - a name for the custom attribute set. |
in_rollOutName | - a name for an eventual rollout. |
in_paramDefs | - an array of descriptions for each parameter in the param block. |
out_errMsg | - (optional): pointer to a MSTR. If non-null and the definition cannot be created, will contain a description of the reason. |
virtual CustAttrib* AddMetaDataToAnimatable | ( | const MetaDataID & | in_metaDataID, |
Animatable & | in_animatable, | ||
int | in_rank = -1 |
||
) | [pure virtual] |
Create a meta-data instance and add it to the custom attribute container of an animatable.
If the meta-data already exists for an animatable, it will not get added.
in_metaDataID | - the meta-data ID of the custom attribute set to be created. |
in_animatable | - the Animatable to which the custom attribute set will be added. |
in_rank | - the insertion index of the custom attribute. Default is to append |
virtual void AddMetaDataToAnimatables | ( | const MetaDataID & | in_metaDataID, |
const Tab< Animatable * > & | in_animatables, | ||
Tab< CustAttrib * > & | out_metaData, | ||
bool | in_shared = false , |
||
int | in_rank = -1 |
||
) | [pure virtual] |
Create meta-data instances and add it to the custom attribute container of animatables.
If the meta-data already exists for an animatable, it will not get added.
in_metaDataID | - the meta-data ID of the custom attribute set to be created. |
in_animatables | - an array of Animatables to which the custom attribute set will be added. |
out_metaData | - an array of MetaData that were created successfully. |
in_shared | - if true, a single instance will be created and shared by all animatables. |
in_rank | - the insertion index of the custom attribute. Default is to append |
virtual bool RemoveMetaDataFromAnimatable | ( | const MetaDataID & | in_metaDataID, |
Animatable & | in_animatable | ||
) | [pure virtual] |
Remove a meta-data from the custom attribute container of an animatable.
in_metaDataID | - the meta-data ID of the custom attribute to be removed. |
in_animatable | - the Animatable from which the custom attribute set will be removed. |
virtual int MetaDataCount | ( | ) | const [pure virtual] |
Returns the number of meta-data in the scene.
virtual void GetAllMetaDataOwners | ( | const MetaDataID & | in_ID, |
Tab< Animatable * > & | out_owners | ||
) | [pure virtual] |
Finds all owners of meta-data of a given meta-data ID.
in_ID | - the meta-data ID of the meta-data. |
out_owners | - an array of Animatables that own meta-data of the given ID. |
virtual bool IsMetaDataDefined | ( | const MetaDataID & | in_ID | ) | const [pure virtual] |
Returns whether a definition exists for a given meta-data ID.
in_ID | - the meta-data ID to be checked. |
virtual CustAttrib* GetMetaData | ( | Animatable & | in_animatable, |
const MetaDataID & | in_ID | ||
) | const [pure virtual] |
Checks the existence of meta-data of a given ID on an animatable.
in_animatable | - the animatable to be checked for meta-data. |
in_ID | - the meta-data ID to be checked. |
virtual void GetAllMetaData | ( | Animatable & | in_animatable, |
Tab< CustAttrib * > & | out_metaData | ||
) | const [pure virtual] |
Finds all meta-data on an animatable.
in_animatable | - the animatable to be checked for meta-data. |
out_metaData | - an array of the meta-data on the Animatable. |
static IMetaDataManager* GetInstance | ( | ) | [inline, static] |
{ return static_cast<IMetaDataManager*>(GetCOREInterface(IID_METADA_MANAGER)); }