About
A DataDescriptionDefinition represents the "raw" description of data attributes. Such a definition is stored e.g. in a static file and loaded by Cinema 4D. The description definition is the base for the final, "resolved" data description, see DataDescription Manual.
Description
General information (maxon::DESCRIPTION::DATA::INFO) is accessed with:
The various attribute descriptions in the definition are stored as DataDictionaries (using the alias maxon::DataDescriptionEntry):
Usable observables are:
ObservableDescriptionChanged:
Is fired on any change of the definition.
maxon::DataDescriptionDefinition definition =
maxon::DataDescriptionDefinitionDatabaseInterface::LoadDescription(
mode, category, language, dataType)
iferr_return;
const auto attributes = definition.GetEntries()
iferr_return;
for (auto& attribute : attributes)
{
DiagnosticOutput(
"Attribute \"@\" of type @. Default value: @", ID, attributeDataType, defaultData);
}
@ DEFAULTVALUE
Dummy value for the default value GeData constructor.
Definition: c4d_gedata.h:65
Definition: datatypebase.h:1229
Result< typename std::conditional< GetCollectionKind< T >::value==COLLECTION_KIND::ARRAY, T, typename ByValueParam< T >::type >::type > Get() const
Definition: datatypebase.h:1389
Definition: apibaseid.h:243
Definition: datatypelib.h:32
const Id & Get() const
Definition: datatypelib.h:165
const Id & Get() const
Definition: apibaseid.h:159
const wchar_t * mode
Definition: fileutils.h:96
for(i=0;i< length;i++)
Definition: unicodeobject.h:61
static auto Create(ARGS &&... args)
Definition: apibase.h:2818
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
The maxon namespace contains all declarations of the MAXON API.
Definition: autoweight.h:14
static constexpr LiteralId DATADESCRIPTION_CATEGORY_DATA
Definition: datadescriptiondatabase.h:15
LOADDESCRIPTIONMODE
Definition: datadescriptiondefinitiondatabase.h:79
#define iferr_return
Definition: resultbase.h:1524
Database
DataDescriptionDefinitions are stored in databases. These databases are managed with maxon::DataDescriptionDefinitionDatabaseInterface.
Description definition databases can be stored in JSON files. These files are loaded with RegisterDatabaseWithUrl().
The databases are accessed with:
For an example see Loading Data Descriptions.
The descriptions stored in the databases are accessed with:
A stored description definition can be updated with:
It is possible to directly access attributes stored in the description definitions:
A callback function can be registered:
Further Reading