#include <uiconversions.h>
|
MAXON_METHOD Result< void > | QuerySupportedDataTypes (BaseArray< DataType > &dataTypes) const |
|
MAXON_METHOD Result< void > | CreateC4DDescription (const DataType &dataType, Description &c4dDescription, const LanguageRef &language, const DataDictionary &dataEntry, const DataDictionary &guiEntry, const DataDescription &mainDataDescription, const DataDescription &stringDescription, const DescID &mainId, const DescID &groupId, const PatchC4DDescriptionEntryDelegate &patchEntryFunc, DescTranslation &translateIds, const BaseArray< InternedId > &parentIds, const DescID &parentFoldId, const GetDataCallbackType &getDataCallback, const GetExtraDataCallbackType &getExtraDataDelegate, BaseDocument *doc) const |
|
MAXON_METHOD Result< void > | ConvertToC4D (GeData &output, const DataType &dataType, const Data &data, const DescID &descIdSuffix, const DataDictionary &dataEntry, const DataDictionary &guiEntry, const GetExtraDataCallbackType &extraDataDelegate, BaseDocument *doc) const |
|
MAXON_METHOD Result< Tuple< Data, Bool > > | ConvertToCore (const DataType &dataType, const GeData &data, const DescID &descIdSuffix, const DataDictionary &dataEntry, const DataDictionary &guiEntry, const Data &oldData, const GetExtraDataCallbackType &extraDataDelegate, BaseDocument *doc) const |
|
◆ MAXON_INTERFACE()
◆ QuerySupportedDataTypes()
Returns the supported data types of the implemented ui.
- Parameters
-
[out] | dataTypes | List of compatible types. |
- Returns
- OK on success.
◆ CreateC4DDescription()
MAXON_METHOD Result<void> CreateC4DDescription |
( |
const DataType & |
dataType, |
|
|
Description & |
c4dDescription, |
|
|
const LanguageRef & |
language, |
|
|
const DataDictionary & |
dataEntry, |
|
|
const DataDictionary & |
guiEntry, |
|
|
const DataDescription & |
mainDataDescription, |
|
|
const DataDescription & |
stringDescription, |
|
|
const DescID & |
mainId, |
|
|
const DescID & |
groupId, |
|
|
const PatchC4DDescriptionEntryDelegate & |
patchEntryFunc, |
|
|
DescTranslation & |
translateIds, |
|
|
const BaseArray< InternedId > & |
parentIds, |
|
|
const DescID & |
parentFoldId, |
|
|
const GetDataCallbackType & |
getDataCallback, |
|
|
const GetExtraDataCallbackType & |
getExtraDataDelegate, |
|
|
BaseDocument * |
doc |
|
) |
| const |
CreateC4DDescription generates the description for the given description entry.
- Parameters
-
[in] | dataType | Data type of the entry. |
[in,out] | c4dDescription | C4D description to fill. |
[in] | language | Language to use. |
[in] | dataEntry | Data description for the given entry. |
[in] | guiEntry | UI description for the given entry. |
[in] | mainDataDescription | Main data description. |
[in] | stringDescription | String description for the given entry and current language. |
[in] | mainId | DescID to use for this id. |
[in] | groupId | Group id to use for this entry. |
[in] | patchEntryFunc | call back which is called for each generated c4d description entry. This allows to patch several parameters from outside before adding to c4dDescription. |
[in] | translateIds | Translation table for all ids. |
[in] | parentIds | Parent ids to concatenate. |
[in] | parentFoldId | Parent fold id. |
[in] | getDataCallback | GetDataCallback in case the data is needed to create the ui. |
[in] | getExtraDataDelegate | Callback to query extra data (e.g. GetRepositoryMessage). |
[in] | doc | Document context for the description. |
- Returns
- OK on success.
◆ ConvertToC4D()
ConvertToC4D implements the data type conversion from Data to GeData for all supported types returned by QuerySupportedDataTypes().
- Parameters
-
[out] | output | The converted value. |
[in] | dataType | Data type to convert. |
[in] | data | Data to convert. |
[in] | descIdSuffix | DescId suffix which indicates the sub entry for UIs which generated multiple DescID attributes in the c4d description. |
[in] | dataEntry | Data description entry of the given value. |
[in] | guiEntry | UI description entry of the given value. |
[in] | extraDataDelegate | Extra delegate to retrieve additional data from parent objects. |
[in] | doc | Document context for the conversion. |
- Returns
- OK on success.
◆ ConvertToCore()
ConvertToCore implements the data type conversion from GeData to Data for all supported types returned by QuerySupportedDataTypes().
- Parameters
-
[in] | dataType | Data type to convert. |
[in] | data | GeData to convert. |
[in] | descIdSuffix | DescId suffix which indicates the sub entry for UIs which generated multiple DescID attributes in the c4d description. |
[in] | dataEntry | Data description entry of the given value. |
[in] | guiEntry | UI description entry of the given value. |
[in] | oldData | Previous old data. |
[in] | extraDataDelegate | Extra delegate to retrieve additional data from parent objects. |
[in] | doc | Document context for the conversion. |
- Returns
- Converted Data on success. Bool: false is the default, true overrites the return value in the port with the ui type (e.g. psrmatrix)
◆ AddDefaultConversion()
AddDefaultConversion allows to add a new default conversion for a given data type.
static MAXON_METHOD Result< void > AddDefaultConversion(const DataType &dataType, const Id &guiId)
#define iferr_return
Definition: resultbase.h:1465
- Parameters
-
[in] | dataType | Data type to add. |
[in] | guiId | UI id to add to the table. |
- Returns
- OK on success.
◆ GetGuiConversionEntry()
static MAXON_METHOD Result<UiConversion> GetGuiConversionEntry |
( |
const Id & |
dataTypeId, |
|
|
const Id & |
guiTypeId, |
|
|
Id * |
resGuiTypeId |
|
) |
| |
|
static |
GetGuiConversionEntry returns the UiConversion object for the given datatype and ui id.
- Parameters
-
[in] | dataTypeId | Data type to use as fallback. |
[in] | guiTypeId | UI to find in the UiConversions registry. If not found the fallback will check the datatype id with the registered default UIs. |
[out] | resGuiTypeId | Optional: if not nullptr it will return the detected UI id. |
- Returns
- UiConversion on success.
◆ GetCompatibleUIs()
Returns a array with all compatible ui types for the given datatype.
- Parameters
-
[in] | dataType | Data type for which all ids should be returned. |
- Returns
- Array with ids on success.
◆ ConvertData() [1/2]
ConvertData converts the given data to any compatible type. If no valid conversion is found an error is returns.
- Parameters
-
[in] | data | Data to convert. |
[in] | dstDataType | Destination data type. |
- Returns
- Converted data on success.
◆ ConvertData() [2/2]
ConvertData converts the given data to any compatible type. If no valid conversion is found an error is returns.
- Parameters
-
[in] | data | Data to convert. |
[in] | dstDataType | Destination data type. |
- Returns
- Converted data on success.