About
Parameters of C4DAtom based elements are identified using a DescID object. Such a DescID object is composed of several levels of DescLevel objects. In this way DescIDs can reflect the structure of complex data types. For example a Vector consists of three Float values. With the first DescLevel the Vector is accessed as a whole, with the second DescLevel the three Float components can be accessed individually.
const DescID sizeXID =
DescID(fractalLenLevel, vectorXLevel);
Definition: lib_description.h:330
Definition: c4d_gedata.h:83
Float GetFloat(void) const
Definition: c4d_gedata.h:439
static String FloatToString(Float32 v, Int32 vvk=-1, Int32 nnk=-3)
Definition: c4d_string.h:529
maxon::Float Float
Definition: ge_sys_math.h:66
@ DTYPE_VECTOR
Vector
Definition: lib_description.h:70
@ DTYPE_REAL
Float
Definition: lib_description.h:68
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
@ VECTOR_X
X component.
Definition: lib_description.h:269
@ PRIM_FRACTAL_SCALE
Definition: ofractal.h:12
@ PRIM_FRACTAL_LEN
Definition: ofractal.h:7
Represents a level within a DescID.
Definition: lib_description.h:289
User data parameters are stored in a sub-container with the ID ID_USERDATA.
const DescID floatParameterID =
DescID(userDataLevel, firstParameter);
{
}
const DescID vectorSubParameterID =
DescID(userDataLevel, secondParameter, vectorXLevel);
{
}
Definition: c4d_string.h:39
@ DTYPE_SUBCONTAINER
Sub-container.
Definition: lib_description.h:58
#define ID_USERDATA
User data ID.
Definition: lib_description.h:25
DescID
A DescID object identifies a parameter.
- Note
- A DescID can be stored in a GeData or BaseContainer using the custom data type CUSTOMDATATYPE_DESCID.
Create
DescID objects can be created with different constructors:
{
}
{
}
#define MAXON_SCOPE
Definition: apibase.h:2818
@ PRIM_SPHERE_RAD
Definition: osphere.h:6
- Note
- Typically a DescID constructed by using only the parameter ID is sufficient. For specialized uses like animation tracks or takes the fully constructed DescID might be needed.
Functionality
A complex DescID object with several levels can be constructed with these tools:
void PushId(const DescLevel &subid)
The levels of a DescID object can also be edited with these operators:
- Note
- The + operator does not work like an integer addition. Important, when constructing parameter IDs dynamically.
Further functions are:
const Int32 depth = descID.GetDepth();
{
}
Py_ssize_t i
Definition: abstract.h:645
static String IntToString(Int32 v)
Definition: c4d_string.h:495
maxon::Int32 Int32
Definition: ge_sys_math.h:60
PyObject PyObject PyObject int level
Definition: import.h:58
Disc I/O
DescID objects can be stored in a HyperFile.
DescLevel
A DescLevel represents a level of a DescID parameter ID.
Create
DescLevel objects can be created with different constructors:
Attributes
The public attributes of a DescLevel are:
String GetObjectName(Int32 type)
Compare
Two DescLevel objects can be compared with:
Further Reading