Overview
- The Maxon API provides typical data types like maxon::Int, maxon::Bool, etc. Developers should use these data types.
- It also provides more complex types like maxon::Vector, maxon::Matrix or maxon::String.
- Instead of low-level C-array one should use build in array types like maxon::BaseArray.
- Arbitrary "classic" data types can be stored in GeData and BaseContainer containers.
- Maxon API data can be stored in maxon::Data and maxon::DataDictionary containers.
- maxon::StreamConversionInterface is an interface for generic data operations e.g. calculation of hash-values or encryption.
- New "classic" data types are based on iCustomDataType and CustomDataTypeClass.
- New Maxon API data types are define with MAXON_DATATYPE.
Basic Data Types
The Maxon API provides basic data types in an OS-independent way. Basic data types exist in both 32 and 64 bit size (e.g. maxon::Int32 and maxon::Int64). maxon::Int is the same as maxon::Int64.
See Primitive Data Types Manual (Cinema API) and Basic Data Types.
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:187
Float64 Float
Definition: apibase.h:196
int32_t Int32
32 bit signed integer datatype.
Definition: apibase.h:175
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
There are also special vector and matrix classes. See Vector Manual (Cinema API), Matrix Manual (Cinema API), Vectors and Matrices.
void Py_ssize_t * pos
Definition: dictobject.h:50
Mat3< Vec3< FLOAT > > GetTranslationMatrix(const Vec3< FLOAT > &translation)
Calculates a matrix to move / translate.
maxon::Vec3< maxon::Float64, 1 > Vector
Definition: ge_math.h:140
Strings
The API includes both the Cinema API ::String as well as maxon::String. The ::String class is based on maxon::String.
See String Manual (Cinema API) and String Manual.
Definition: string.h:1287
Data Collections
Data can be stored and handled in array, mash maps and lists. These classes allow fast and safe handling of dynamic data.
See BaseArray Manual, Arrays Manual and Maxon API Containers & Data Collections.
{
}
Definition: basearray.h:415
MAXON_ATTRIBUTE_FORCE_INLINE ResultRef< T > Append(ARG &&x)
Appends a new element at the end of the array and constructs it using the forwarded value.
Definition: basearray.h:627
#define iferr_return
Definition: resultbase.h:1531
Cinema API Data Containers
The container types GeData and BaseContainer are used to store any kind of Cinema API data type. The typical use case is to store the parameter values of objects that are based on C4DAtom like BaseObject, BaseMaterial etc.
See GeData Manual, BaseContainer Manual and C4DAtom Manual.
GeData data;
BaseContainer container;
container.SetData(VALUE_A, data);
container.SetInt32(VALUE_B, 456);
const GeData& secondValueData = container.GetData(VALUE_B);
PyObject * value
Definition: abstract.h:715
maxon::Int32 Int32
Definition: ge_sys_math.h:51
Maxon API Data Containers
The Maxon API equivalent to GeData and BaseContainer are maxon::Data and maxon::DataDictionary. These classes are used to store any kind of Maxon API data type. A maxon::DataDictionary is often used to define settings of a complex operation.
See Data Manual and DataDictionary Manual.
maxon::DataDictionary dictionary;
Definition: datatypebase.h:1745
Definition: datatypebase.h:1234
Result< void > Set(T &&data)
Definition: datatypebase.h:1383
Result< typename std::conditional< GetCollectionKind< T >::value==COLLECTION_KIND::ARRAY||std::is_void_v< T >, T, std::add_lvalue_reference_t< const T > >::type > Get() const
Definition: datatypebase.h:1394
Stream Conversions
maxon::StreamConversionInterface is a generic interface for any kind of data conversion. Examples are data compression, encryption or the calculation of hash values.
See Stream Conversions Manual.
const maxon::StreamConversionRef md5 = maxon::StreamConversions::HashMD5().Create()
iferr_return;
PyObject Py_hash_t hash
Definition: dictobject.h:35
const Py_UNICODE * source
Definition: unicodeobject.h:54
Result< String > GetHashString(const BaseArray< UChar > &hashValue)
PyObject * text
Definition: pycore_traceback.h:70
Custom Data Types
Classic custom data types are based on iCustomDataType and CustomDataTypeClass. Such custom data types can be stored in GeData and BaseContainer objects.
New Maxon API data types are registered using the MAXON_DATATYPE attribute. Such data types can be stored in maxon::Data and maxon:DataDictionary objects.
See MAXON Data Type.