Maxon API for Python
-
Apologies in advance if this question is out of scope.
Is the Maxon API already fully usable for Python, or can it completely replace the classic API? I find it very difficult to understand right now. Or is it more intended for initializing data types and using it in conjunction with the classic API?
And if not, when will it finally be fully usable for Python? -
Hey @ThomasB,
Thank you for reaching out to us. First of all, there is no classic API anymore, see here for details. It has effectively been renamed to Cinema API.
- Cinema API: Contains components that are specific to Cinema 4D, as for example its scene graph, the whole plugin system, and also a lot of low level components, e.g.,
c4d.Vector
. - Maxon API: Contains components that are not specific to Cinema 4D and either could be or are actively used by other Maxon apps (in fact Cinema 4D is not guaranteed to use all parts of the Maxon API itself). The Maxon API contains both high-level components, e.g., the Asset or Nodes API, as well as low level components such as data types, e.g.,
maxon.Vector
. You can think of the Maxon API as Maxon's C++ std library.
Even in C++, the Maxon API is not meant to replace the Cinema API, but rather to complement it. It is not impossible that we one day will say, 'let's write an abstract scene graph model that we will then also use in Cinema 4D', but that would be a truly huge undertaking. For now, fundamentals of the Cinema API such as
BaseContainer
,C4DAtom
,GeListNode
,BaseList2D
,BaseDocument
, orBaseObject
are here to stay.These days many components in the Cinema API are also only thin wrappers or just aliases for the Maxon API. When you create a cinema::Vector in C++, that is just an alias for a
maxon::Vec3<maxon::Float64,1>
, i.e., a 64bit R³ vector template. The same also applies to Python, when you create there ac4d.Vector
, what will actually operate for you under the hood is suchmaxon::Vec3
template forFloat64
. This applies to many pure data structures and also things like bitmaps, paths, colorprofiles, and other lower level data. The Maxon API also has high level components such as Assets, Nodes, or Volumes and when there are important systems which make sense to expose to Python, we will expose them. But the bottom line is here, for frontend users such as Python, the Cinema API is mostly the thing to work with.When you want to get a better sense of how our APIs are structured, you can look at the C++ Manual API Overview.
Cheers,
Ferdinand - Cinema API: Contains components that are specific to Cinema 4D, as for example its scene graph, the whole plugin system, and also a lot of low level components, e.g.,
-
@ferdinand
Thank you for your detailed explanation, it shed some light on the whole matter for me.