About
A DynamicDescription object stores the description of user data parameters that can be added to an element by the user. It allows to access existing parameters and also to add new parameters.
- Warning
- Standard parameters can be dynamically created and edited by implementing NodeData::GetDDescription(). See NodeData::GetDDescription() Manual.
- Note
- User data parameters are accessed using a special DescID, see DescID Manual.
-
For description parameter IDs see Description Settings Manual.
if (op == nullptr)
if (ddesc == nullptr)
{
groupID = ddesc->
Alloc(bc);
}
{
}
Access
The DynamicDescription object can be obtained from every C4DAtom:
The description of a specific user data parameter can be directly accessed:
if (ddesc == nullptr)
if (bc != nullptr)
It is also possible to iterate through all user data parameter descriptions:
if (ddesc == nullptr)
if (handle == nullptr)
{
if (bc != nullptr)
}
Edit User Data
User data parameter descriptions can be added or removed:
- Note
- An empty DescID as the DESC_PARENTGROUP of a user data group will create a new tab in the Attribute Manager.
Interaction
User data parameters can include buttons. When such a button is pressed a message is sent to NodeData::Message(), see NodeData::Message() Manual.
{
if (dc == nullptr)
return false;
{
{
}
}
break;
}
Miscellaneous
Further functions of the DynamicDescription class are:
User Data Editor
The user data manager can be opened with these functions:
Further Reading
DynamicDescription * GetDynamicDescription()
BaseContainer GetCustomDataTypeDefault(Int32 type)
void MessageDialog(const maxon::String &str)
GeData * SetData(Int32 id, const GeData &n)
Definition: c4d_basecontainer.h:255
static String UIntToString(UInt32 v)
Definition: c4d_string.h:511
Definition: c4d_baseobject.h:224
Definition: lib_description.h:328
void SetInt32(Int32 id, Int32 l)
Definition: c4d_basecontainer.h:505
void SetString(Int32 id, const maxon::String &s)
Definition: c4d_basecontainer.h:569
maxon::UInt32 UInt32
Definition: ge_sys_math.h:61
@ DTYPE_SUBCONTAINER
Sub-container.
Definition: lib_description.h:58
Definition: string.h:1225
#define CUSTOMDATATYPE_DESCID
DescID custom data type ID.
Definition: lib_description.h:261
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
@ DESC_COLUMNS
Int32 Number of columns for layout groups (DTYPE_GROUP).
Definition: lib_description.h:127
#define MSG_DESCRIPTION_COMMAND
Sent by for example BUTTON description element. The corresponding data is DescriptionCommand.
Definition: c4d_baselist.h:375
void BrowseFree(void *&handle)
@ DTYPE_GROUP
Group.
Definition: lib_description.h:56
#define ID_USERDATA
User data ID.
Definition: lib_description.h:25
Message struct for MSG_DESCRIPTION_COMMAND.
Definition: lib_description.h:851
@ DTYPE_VECTOR
Vector
Definition: lib_description.h:70
Represents a level within a DescID.
Definition: lib_description.h:287
@ DTYPE_STRING
String.
Definition: lib_description.h:72
Definition: c4d_gedata.h:82
DescID _descId
Description ID of the parameter that triggered the command.
Definition: lib_description.h:844
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
const BaseContainer * Find(const DescID &descid)
@ DESC_SCALEH
Bool Scale element horizontally.
Definition: lib_description.h:135
Bool BrowseGetNext(void *handle, DescID *id, const BaseContainer **data)
String GetString(Int32 id, const maxon::String &preset=maxon::String()) const
Definition: c4d_basecontainer.h:387
@ DESC_NAME
String Name for standalone use.
Definition: lib_description.h:91
BaseObject * GetActiveObject(void)
@ DESC_PARENTGROUP
Int32/DescID Parent ID.
Definition: lib_description.h:117
@ DESC_DEFAULT
Int32/Float/Vector Default numeric value.
Definition: lib_description.h:120
void AddDescription(C4DAtom *bl)
Definition: lib_description.h:734
DescID Alloc(const BaseContainer &datadescription)
#define MAXON_SCOPE
Definition: apibase.h:2798
Bool FillDefaultContainer(BaseContainer &res, Int32 type, const String &name)
Definition: c4d_basecontainer.h:46