Import C4D vs Import Maxon
-
Hi,
Just checked the R21 documentation and introduces a new
import maxon
line.
Does this mean theimport c4d
will be deprecated in the future and slowly replaced by theimport maxon
? -
hello @bentraje
Don't forget to mark your thread as question and mark it solved after
The core of cinema4D have been rewrite. (started some years ago now) and more and more of the old code is replaced by the new API.
So you have what we call "classic API" that is c4d and the modules below, and the Maxon API that is the new one.
import c4d -> Classic API
import maxon -> Maxon APIThat's the same with c++, the Maxon API will replace the Classic API in the future, but we don't know how much time it will take and how much time the classic API will remain before being removed.
For sure, you should use, as much as possible, the Maxon API.
Cheers
Manuel -
Gotcha. Thanks for the confirmation.
How usable is the
Maxon API (import maxon)
at the moment?
Can it select an object and modify its parameter?I'm sorry I can't find any MaxonAPI example codes. Most the example scripts in the Github are still in
Classic API (import API)
? -
Hi,
the new
maxon
module is new to me too, but here are some of my impressions:- The
maxon
module just like its counter part inC++
is mostly a paradigm / concept shift at the moment. Examples would be type concepts, atomic data types, syntactic sugar like decorators or just restructuring the APi in general. - The two main 'real' functionalities are currently the direct access to the underlying data of volume objects in c4d via the
volume
framework and the new generalizedCustomdataTags\MeshAttributes
which (I think) are meant to replace the oldVariableTags
(ie. how c4d storers points, polygons, normals, etc.) on the long run. - So no, in 99% of the cases you won't need the
maxon
module at the moment unless you are heading into the direction of volumes orCustomdataTags
.
Cheers
zipit - The
-
Hi,
Well, to answer you @zipit, i'm not going to say "this all follows a bigger plan"
I understand that from an external point of view the Maxon API is "just" a concept but it's not we are using it every days, more and more will be bring to you.
Don't forget, in Cinema 4D, you have what is exposed in the API and what's behind the curtain.I'm not going to enter into details but the Maxon API will also help us to bring the C++ functionalities really faster than before. So the python will be closer than what we have in C++
MeshAttributes allow you to store any kind of information on points. Before you were limited to c4d Datatype.
It's not only about replacing old stuff, it's giving the developers the same tool we are using and a lot more possibilities.There's not too much examples in python for now because we didn't wrote them yet.
Keep asking questions, we will write examples, improve documentation etc..
@bentraje
It look obvious but in the documentation the Maxon API is what's on the right.So not too much for now but, as with the c++ questions, we will more and more answer with Maxon API code.
Cheers
Manuel. -
@zipit
It seems like so (i.e. you won't need the maxon module unless using the volume framework)
@m_magalhaes
I check the documentation previously, but I have problem looking for stuff.
For instance, I want the equivalent ofdoc.SearchObject()
in Maxon API or modiying parametersCube[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] = 10
Is this possible in Maxon API currently?
-
@m_magalhaes said in Import C4D vs Import Maxon:
Hi,
Well, to answer you @zipit, i'm not going to say "this all follows a bigger plan"
I understand that from an external point of view the Maxon API is "just" a concept but it's not we are using it every days, more and more will be bring to you.
Don't forget, in Cinema 4D, you have what is exposed in the API and what's behind the curtain.Hi,
I think there was a misunderstanding. I did not (want to) say that the new API is 'just a concept'. I am at least somewhat aware of its role on the C++ side of things. I was just trying to convey that it is a more fundamental change than just adding the new functionality X and that what is now exposed to us in the
maxon
module mostly deals with these more fundamental paradigm changes. I was (trying to) directly answer one of the questions of the OP: If he has to worry about the new API on day-2-day tasks like selecting an object. My answer was: He doesn'tCheers
zipit -
Sorry for my misunderstood @zipit (my french side you know ^^)
@bentraje don't try too much to search for equivalent for now.
I'm not talking about python but about that Classic/Maxon API :
For example, BaseContainer is used almost everywhere in Cinema4D. It's not something you can migrate to DataDictionary like nothing ^^
But, in some case, you can use DataDictionary for parts of your codes but you still need BaseContainer to access object's parameters.Some of part of the classic API are using part of the maxon API GetImageSettingsDictionary return a
maxon.DataDictionary
or the same with GetAutoWeightDictionaryWe are moving toward the Maxon API, it's going to take time. Don't be surprise and if you have question, just ask.
Cheers,
Manuel -
@zipit @m_magalhaes
Yes, zipit was correct on my concern:
If he has to worry about the new API on day-2-day tasks like selecting an object
Guess, I don't have to for now.
Thanks for the clarification.