About
GeData is a container class. This container is used to store data of all classic data types that are supported by Cinema 4D.
Access
A GeData object can be used to directly change the value of a parameter of a C4DAtom object:
See also C4DAtom Manual.
A BaseContainer object stores multiple values using GeData objects:
See also BaseContainer Manual.
Definition: c4d_baseobject.h:225
Definition: lib_description.h:330
Definition: c4d_gedata.h:83
Int32 GetType(void) const
Definition: c4d_gedata.h:407
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
@ DA_REAL
Float.
Definition: c4d_gedata.h:41
#define Osphere
Sphere.
Definition: ge_prepass.h:1096
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
@ PRIM_SPHERE_RAD
Definition: osphere.h:6
const char * doc
Definition: pyerrors.h:226
Data
Type
A GeData object stores data of a certain type.
- GeData::SetDefault(): Sets the default value for the given data type.
- DEFAULTVALUE: Dummy value for the constructor to initialize the object with the default value.
@ DEFAULTVALUE
Dummy value for the default value GeData constructor.
Definition: c4d_gedata.h:65
Definition: c4d_basecontainer.h:47
GeData * SetData(Int32 id, const GeData &n)
Definition: c4d_basecontainer.h:255
Definition: c4d_baselist.h:2190
@ DTYPE_BASELISTLINK
BaseLink.
Definition: lib_description.h:74
- Note
- If the type is not set, GeData::GetType() returns DA_NIL.
if (!success)
maxon::Bool Bool
Definition: ge_sys_math.h:55
Access
The GeData class offers access functions for all supported data types. "Set" functions set the value and also change the data type if needed. "Get" functions return the value and are only allowed to be used if the data type matches.
Int32 and Bool data (data type DA_LONG):
Int64 data (data type DA_LLONG):
Float data (data type DA_REAL):
See also Primitive Data Types Manual (Classic).
Void pointers (data type DA_VOID):
SomeObject*
const obj =
static_cast<SomeObject*
>(data.
GetVoid());
void * GetVoid(void) const
Definition: c4d_gedata.h:445
void SetVoid(void *v)
Definition: c4d_gedata.h:585
PyObject * obj
Definition: complexobject.h:60
- Note
- In general it is not recommended to use "raw" pointers, instead see BaseLink Manual.
Raw memory (data type DA_BYTEARRAY):
if (data != nullptr)
{
}
Py_ssize_t count
Definition: abstract.h:640
void * GetMemory(Int &count)
Definition: c4d_gedata.h:546
void SetMemory(void *data, Int count)
Definition: c4d_gedata.h:592
Definition: c4d_string.h:39
Py_ssize_t char * output
Definition: unicodeobject.h:985
maxon::Char Char
Definition: ge_sys_math.h:56
maxon::Int Int
Definition: ge_sys_math.h:64
Vector objects (data type DA_VECTOR):
See also Vector Manual (Classic).
Matrix objects (data type DA_MATRIX):
See also Matrix Manual (Classic).
String objects and C4DUuid objects (data type DA_STRING):
See also String Manual (Classic).
Filename objects (data type DA_FILENAME):
See also Filename Manual.
C4DUuid objects: (data type DA_UUID):
BaseTime objects (data type DA_TIME):
See also BaseTime Manual.
Tristate (data type DA_TRISTATE):
See also TriState Manual.
BaseContainer objects (data type DA_CONTAINER):
{
}
{
if (bc == nullptr)
}
const GeData & GetData(Int32 id) const
Definition: c4d_basecontainer.h:262
GeData * InsData(Int32 id, const GeData &n)
Definition: c4d_basecontainer.h:238
const String & GetString(void) const
Definition: c4d_gedata.h:463
void SetContainer(const BaseContainer &v)
Definition: c4d_gedata.h:645
BaseContainer * GetContainer(void) const
Definition: c4d_gedata.h:487
#define MAXON_SCOPE
Definition: apibase.h:2818
See also BaseContainer Manual.
BaseLink objects (data type DA_ALIASLINK):
See also BaseLink Manual.
Custom data types:
if (priorityData == nullptr)
CustomDataType * GetCustomDataType(Int32 datatype) const
Definition: c4d_gedata.h:507
Priority custom data type (CUSTOMGUI_PRIORITY_DATA).
Definition: customgui_priority.h:80
Bool SetPriorityValue(Int32 lValueID, const GeData &data)
#define CUSTOMGUI_PRIORITY_DATA
Priority custom data type ID.
Definition: customgui_priority.h:23
#define PRIORITYVALUE_CAMERADEPENDENT
Bool Camera dependent.
Definition: customgui_priority.h:36
Base class for custom data types.
Definition: c4d_customdatatype.h:51
Represents a level within a DescID.
Definition: lib_description.h:289
@ EXPRESSION_PRIORITY
Definition: texpression.h:6
Copy
The data of one GeData object can easily be copied to another object:
GeData stringData {
"foobar" };
stringData.CopyData(&intData, nullptr);
@ DA_STRING
String.
Definition: c4d_gedata.h:47
Clear
A GeData object can be cleared.
void Free(void)
Deletes the internal data and sets the type to DA_NIL.
Definition: c4d_gedata.h:337
@ DA_NIL
No value.
Definition: c4d_gedata.h:38
Compare
Two GeData objects can be compared with the usual operators:
if (intergerDataA != integerDataB)
void SetInt32(Int32 v)
Definition: c4d_gedata.h:573
void SetInt64(const Int64 &v)
Definition: c4d_gedata.h:579
Disc I/O
A GeData object can be stored in a HyperFile:
if (hf == nullptr)
{
hf->WriteGeData(data);
hf->Close();
}
else
{
}
PyCompilerFlags const char * filename
Definition: ast.h:15
maxon::Url MaxonConvert(const Filename &fn, MAXONCONVERTMODE convertMode)
@ NONE
No check if file exists under case-sensitive drives.
Definition: ge_autoptr.h:37
@ ANY
Show an error dialog for any error.
if (hf == nullptr)
{
hf->ReadGeData(&data);
hf->Close();
}
else
{
}
@ READ
Open the file for reading.
Further Reading