IMetaDataManager Class Reference

IMetaDataManager Class Referenceabstract

#include <IMetaData.h>

Class Description

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.

See also
CustAttrib
+ Inheritance diagram for IMetaDataManager:

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 Types inherited from BaseInterface
enum  LifetimeType { noRelease, immediateRelease, wantsRelease, serverControlled }
 

Public Member Functions

virtual MetaDataID CreateMetaDataDefinition (const MCHAR *in_custAttribSetName, const 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. More...
 
virtual CustAttribAddMetaDataToAnimatable (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. More...
 
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. More...
 
virtual bool RemoveMetaDataFromAnimatable (const MetaDataID &in_metaDataID, Animatable &in_animatable)=0
 Remove a meta-data from the custom attribute container of an animatable. More...
 
virtual int MetaDataCount () const =0
 Returns the number of meta-data in the scene. More...
 
virtual void GetAllMetaDataOwners (const MetaDataID &in_ID, Tab< Animatable * > &out_owners)=0
 Finds all owners of meta-data of a given meta-data ID. More...
 
virtual bool IsMetaDataDefined (const MetaDataID &in_ID) const =0
 Returns whether a definition exists for a given meta-data ID. More...
 
virtual CustAttribGetMetaData (Animatable &in_animatable, const MetaDataID &in_ID) const =0
 Checks the existence of meta-data of a given ID on an animatable. More...
 
virtual void GetAllMetaData (Animatable &in_animatable, Tab< CustAttrib * > &out_metaData) const =0
 Finds all meta-data on an animatable. More...
 
- Public Member Functions inherited from FPInterfaceDesc
CoreExport FPInterfaceDesc ()
 
CoreExport FPInterfaceDesc (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, ULONG flag,...)
 
CoreExport ~FPInterfaceDesc ()
 
virtual void Init ()
 
LifetimeType LifetimeControl ()
 
virtual BaseInterfaceGetInterface (Interface_ID id)
 
CoreExport void LoadDescriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *pCD, ULONG flag,...)
 
CoreExport void AppendFunction (int id,...)
 Add a new function to this interface descriptor. More...
 
CoreExport void AppendProperty (int id,...)
 Add a new property to this interface descriptor. More...
 
CoreExport void AppendEnum (int id,...)
 Add a new enum to this interface descriptor. More...
 
CoreExport void SetClassDesc (ClassDesc *i_cd)
 
CoreExport va_list check_fn (va_list ap, int id)
 
CoreExport va_list scan_fn (va_list ap, int id, int index)
 
CoreExport va_list check_prop (va_list ap, int id)
 
CoreExport va_list scan_prop (va_list ap, int id, int index)
 
CoreExport va_list check_enum (va_list ap, EnumID id)
 
CoreExport va_list scan_enum (va_list ap, EnumID id, int index)
 
FPInterfaceDescGetDesc ()
 
Interface_ID GetID ()
 
CoreExport FPFunctionDefGetFnDef (FunctionID fid)
 
ActionTableGetActionTable ()
 
CoreExport void EnableActions (BOOL onOff)
 
virtual CoreExport HINSTANCE HInstance ()
 
virtual CoreExport const MCHARGetRsrcString (StringResID id)
 
- Public Member Functions inherited from FPInterface
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t=0, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPParams *params)
 
virtual CoreExport FPStatus Invoke (FunctionID fid, TimeValue t, FPValue &result, FPParams *params=NULL)
 
virtual FPStatus Invoke (FunctionID fid, FPValue &result, FPParams *params=NULL)
 
virtual CoreExport FunctionID FindFn (const MCHAR *name)
 
virtual CoreExport BOOL IsEnabled (FunctionID actionID)
 
virtual CoreExport BOOL IsChecked (FunctionID actionID)
 
virtual CoreExport BOOL IsVisible (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsEnabled (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsChecked (FunctionID actionID)
 
virtual CoreExport FunctionID GetIsVisible (FunctionID actionID)
 
- Public Member Functions inherited from BaseInterface
virtual UtilExport ~BaseInterface ()
 Destructor. More...
 
virtual bool RegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual void UnRegisterNotifyCallback (InterfaceNotifyCallback *incb)
 
virtual BaseInterfaceAcquireInterface ()
 
virtual void ReleaseInterface ()
 
virtual void DeleteInterface ()
 
virtual BaseInterfaceCloneInterface (void *remapDir=NULL)
 
- Public Member Functions inherited from InterfaceServer
virtual UtilExport ~InterfaceServer ()
 Destructor. More...
 

Static Public Member Functions

static IMetaDataManagerGetInstance ()
 
- 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...
 

Additional Inherited Members

- Public Attributes inherited from FPInterfaceDesc
Interface_ID ID
 
MSTR internal_name
 
StringResID description
 
ClassDesccd
 
USHORT flags
 
Tab< FPFunctionDef * > functions
 
Tab< FPPropDef * > props
 
Tab< FPEnum * > enumerations
 
MSPluginClass * pc
 
Rolloutrollout
 
ActionTableaction_table
 
- Static Public Attributes inherited from FPInterface
static CoreExport FPInterfaceDesc nullInterface
 
- Protected Member Functions inherited from FPInterfaceDesc
CoreExport void load_descriptor (Interface_ID id, const MCHAR *int_name, StringResID descr, ClassDesc *cd, USHORT flag, va_list ap)
 
- Protected Member Functions inherited from FPInterface
virtual FPStatus _dispatch_fn (FunctionID fid, TimeValue t, FPValue &result, FPParams *p)
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
eAlignLeft 
eAlignCenter 
eAlignRight 
45  {
46  eAlignLeft,
49  };
Definition: IMetaData.h:48
Definition: IMetaData.h:46
Definition: IMetaData.h:47

Member Function Documentation

virtual MetaDataID CreateMetaDataDefinition ( const MCHAR in_custAttribSetName,
const 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.

Parameters
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.
Returns
EmptyMetaDataID if for any reason the definition cannot be created:
  • invalid parameter description
  • the definitionID already exists any other MetaDataID value if the definition was created successfully
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.

Parameters
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
Returns
the MetaData if created successfully, NULL otherwise
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.

Parameters
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.

Parameters
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.
Returns
true if the MetaData was 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.

Parameters
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.

Parameters
in_ID- the meta-data ID to be checked.
Returns
true if the MetaData was defined.
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.

Parameters
in_animatable- the animatable to be checked for meta-data.
in_ID- the meta-data ID to be checked.
Returns
the meta-data if it exists.
virtual void GetAllMetaData ( Animatable in_animatable,
Tab< CustAttrib * > &  out_metaData 
) const
pure virtual

Finds all meta-data on an animatable.

Parameters
in_animatable- the animatable to be checked for meta-data.
out_metaData- an array of the meta-data on the Animatable.
static IMetaDataManager* GetInstance ( )
inlinestatic
200  {
201  return static_cast<IMetaDataManager*>(GetCOREInterface(IID_METADA_MANAGER));
202  }
The interface for creating, adding, removing and keeping track of meta-data on max Animatables...
Definition: IMetaData.h:38
CoreExport Interface * GetCOREInterface()
#define IID_METADA_MANAGER
The unique interface ID for the Meta-Data Manager.
Definition: IMetaData.h:29