#include <c4d_customdatatype.h>
A data class for creating custom data types' aliases.
These can be used in descriptions as a shortcut for a custom data type with certain options, for example like VECTOR and COLOR.
Use RegisterResourceDataTypePlugin() to register a resourse data type plugin.
Public Member Functions | |
ResourceDataTypeClass (Int32 datatypeid, CUSTOMDATATYPEPLUGIN *datatype) | |
virtual Int32 | GetId ()=0 |
virtual Int32 | GetCustomDataType () |
virtual CUSTOMDATATYPEPLUGIN * | GetCustomDataTypePlugin () |
virtual void | GetDefaultProperties (BaseContainer &data) |
virtual const Char * | GetResourceSym () |
virtual CustomProperty * | GetProperties () |
virtual Bool | GetDescription (const CustomDataType *data, Description &res, DESCFLAGS_DESC &flags, const BaseContainer &parentdescription, DescID *singledescid) |
virtual void | CheckData (const BaseContainer &bc, GeData &data) |
Public Member Functions inherited from BaseData | |
BaseData () | |
virtual | ~BaseData () |
void | Destructor () |
Private Attributes | |
Int32 | datatypeid |
CUSTOMDATATYPEPLUGIN * | datatype |
ResourceDataTypeClass | ( | Int32 | datatypeid, |
CUSTOMDATATYPEPLUGIN * | datatype | ||
) |
Constructor. Pass the ID and plugin structure for the custom data type to create an alias for.
The easiest way to get the plugin structure is to call FindCustomDataTypePlugin(), for example:
[in] | datatypeid | The custom data type ID. |
[in] | datatype | The custom data type plugin structure. |
|
pure virtual |
Called to get the plugin ID of the resource data type.
|
virtual |
Called to get the plugin ID of the custom data type that this is an alias for.
|
virtual |
Called to get the internal plugin structure of the custom data type that this is an alias for.
|
virtual |
Called to provide default properties for the data type.
These properties will be used if the user does not specify anything else.
It is common to add DESC_ANIMATE and DESC_CUSTOMGUI to the default properties:
[in] | data | Filled with the default properties for the data type in the resource. |
|
virtual |
Called to get the symbol to use in resource files, for example "GRADIENT".
const Char*
string with the resource symbol.
|
virtual |
Called to get the properties that the data type accepts in resource files.
|
virtual |
Called to add sub-parameters to the description for the data.
Modify the passed description res object as needed, set the appropriate flags and then make sure to include a call to the parent at the end:
[in] | data | The custom data type to get the description for. Points to an instance of the internal data type. Cinema 4D owns the pointed data. |
[out] | res | The description to add the parameters to. |
[in,out] | flags | The flags for the description operation: DESCFLAGS_DESC |
[in] | parentdescription | The description container for the parent's description, encoded as described in Description. |
[out] | singledescid | Private. |
|
virtual |
Called to let validate the values of data with the settings in bc.
Modify data accordingly so that it is valid.
[in] | bc | The settings container. |
[in,out] | data | The data value to check. |
|
private |
|
private |