Open Search
    c4d_customdatatype.h File Reference

    Classes

    struct  CustomDataType
     
    struct  CustomDataTypeT< TDATATYPEID >
     
    struct  GvHelper
     
    struct  iCustomDataType< X, TDATATYPEID >
     
    class  CustomDataTypeClass
     
    class  ResourceDataTypeClass
     

    Macros

    #define CUSTOMDATATYPE_INFO_HASSUBDESCRIPTION
     
    #define CUSTOMDATATYPE_INFO_NEEDDATAFORSUBDESC
     
    #define CUSTOMDATATYPE_INFO_TOGGLEDISPLAY
     
    #define CUSTOMDATATYPE_INFO_DONTREGISTERGVTYPE
     
    #define CUSTOMDATATYPE_INFO_SUBDESCRIPTIONDISABLEGUI
     
    #define CUSTOMDATATYPE_INFO_UNDOSAMECUSTOMGUI
     
    #define CUSTOMDATATYPE_INFO_HASSUBDESCRIPTION_NOANIM
     
    #define CUSTOMDATATYPE_INFO_LOADSAVE
     
    #define CUSTOMDATATYPE_INFO_NO_GUI_COPY
     
    #define CUSTOMDATATYPE_INFO_NO_ALIASTRANS
     
    #define CUSTOMDATATYPE_INFO_BLOCKING
     

    Functions

    Bool RegisterCustomDataTypePlugin (const maxon::String &str, Int32 info, CustomDataTypeClass *dat, Int32 disclevel)
     
    Bool RegisterResourceDataTypePlugin (const maxon::String &str, Int32 info, ResourceDataTypeClass *dat, Int32 disclevel)
     

    Function Documentation

    ◆ RegisterCustomDataTypePlugin()

    Bool RegisterCustomDataTypePlugin ( const maxon::String str,
    Int32  info,
    CustomDataTypeClass dat,
    Int32  disclevel 
    )

    Registers a custom data type plugin.

    Parameters
    [in]strThe name of the plugin.
    [in]infoThe custom data type plugin info flags: CUSTOMDATATYPE_INFO PLUGINFLAG
    [in]datAn instance for the custom data type plugin. Cinema 4D takes over the ownership of the pointed data instance.
    [in]disclevelThe plugin level is similar to a version number. The default level is 0.
    Increase this for new revisions of a plugin to allow for forward and backward compatibility.

    As an example you may have updated a plugin. If you now need to write additional information for new settings or changed types for old settings increase the level.
    During loading either a 0 is passed (if the file was written by the old plugin) or 1 (if the file was written by the new plugin). This allows to easily write/read new values.
    For forward and backward compatibility to work any existing read order from a given level must not be changed. Cinema 4D skips any new settings automatically if they have not been read.

    disklevel is only useful if variables are written/read in CustomDataTypeClass::WriteData/ CustomDataTypeClass::ReadData.
    Returns
    true if the custom data type plugin was registered, otherwise false.

    ◆ RegisterResourceDataTypePlugin()

    Bool RegisterResourceDataTypePlugin ( const maxon::String str,
    Int32  info,
    ResourceDataTypeClass dat,
    Int32  disclevel 
    )

    Registers a resource data type plugin.

    Parameters
    [in]strThe name of the plugin.
    [in]infoThe resource data type plugin info flags: PLUGINFLAG
    [in]datAn instance for the resource data type plugin. Cinema 4D takes over the ownership of the pointed data instance.
    [in]disclevelThe plugin level is similar to a version number. The default level is 0.
    Increase this for new revisions of a plugin to allow for forward and backward compatibility.

    As an example you may have updated a plugin. If you now need to write additional information for new settings or changed types for old settings increase the level.
    During loading either a 0 is passed (if the file was written by the old plugin) or 1 (if the file was written by the new plugin). This allows to easily write/read new values.
    For forward and backward compatibility to work any existing read order from a given level must not be changed. Cinema 4D skips any new settings automatically if they have not been read.

    disklevel is only useful if variables are written/read in CustomDataTypeClass::WriteData/ CustomDataTypeClass::ReadData.
    Returns
    true if the resource data type plugin was registered, otherwise false.