• lhit from BaseVolumeData

    Cinema 4D SDK r21 python windows
    3
    0 Votes
    3 Posts
    549 Views
    JH23J
    Hey @m_adam, Thanks for the reply! What you’re saying makes a lot of sense C++ is clearly the better option for this kind of stuff, especially when you need more control and better performance. I haven’t had much chance to dive into C++ yet, but I’m well aware it’s way more powerful than Python when it comes to working with the engine. It’s a bit of a shame that there’s no way to directly access polygon info from Python, since that’s exactly what I needed. But still, I really appreciate you taking the time to explain it. Cheers, James H.
  • 0 Votes
    3 Posts
    659 Views
    B
    Thank you @ferdinand for the help! Write raw memory does help a lot, appreciate!
  • create link parameter accept Alembic tag

    Cinema 4D SDK r21 2025 c++
    3
    0 Votes
    3 Posts
    600 Views
    B
    @m_adam, Thank you! Yes, Message(GeListNode* node, Int32 type, void* data) works for me. I'm wondering shall my plugin just return true after processing MSG_DESCRIPTION_CHECKDRAGANDDROP in the Message() function (set the value of DescriptionCheckDragAndDrop::_result) or still call SUPER::Message(node, type, data); at the end? It looks to me that calling SUPER::Message(node, type, data); at the end still works. But the example in MSG_DESCRIPTION_CHECKDRAGANDDROP Message doesn't call SUPER::Message(node, type, data);. Thanks!
  • Read Alembic tag's data

    Cinema 4D SDK r21 2025 c++
    3
    0 Votes
    3 Posts
    575 Views
    B
    @m_adam, Thank you very much, this works for me!
  • 0 Votes
    10 Posts
    1k Views
    B
    Thank you very much for all your detailed explanation, @ferdinand!
  • Strange string addition crash

    Cinema 4D SDK r21 c++ windows
    3
    0 Votes
    3 Posts
    478 Views
    E
    Thanks for your response. We found the issue. Turns out we had to delay load our dlls for earlier versions of the plugin R21 etc
  • TempUVHandle always None! Why?

    Cinema 4D SDK r21 python windows
    3
    0 Votes
    3 Posts
    659 Views
    ThomasBT
    @i_mazlov Thank you very much for the hint with the texture view and for the helpful links. The second thread I have already read, but was not able to find the solution so far. I study these examples. Thank you.
  • Getting UV coordinates from a plane

    Cinema 4D SDK python r21
    9
    1
    0 Votes
    9 Posts
    1k Views
    ferdinandF
    Hey @rui_mac, no, they do not match the uvw coordinates. They are weights, please have look at the example I have linked to above, it likely does everything you need. GetPolyPointST expects a value in local object coordinates and returns weights for the polygon UVW coordinates. You get then your final coordinate by the bilinear interpolation of the UVW quad over the s,t weights. You can of course technically replicate all the math yourself, but as Ilia has pointed out this would be out of scope of support. Cheers, Ferdinand
  • 0 Votes
    2 Posts
    691 Views
    ferdinandF
    Hello @Hohlucha, Welcome to the Maxon developers forum and its community, it is great to have you with us! Getting Started Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules. Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment. Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support. Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads. It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions. About your First Question This is a development forum and your question does not seem to be development related. Please read our forum guidelines lined out above. I have moved this topic into General Talk for now. When this is indeed an end user question we must ask you to use our Support Center, the developer forum is not the right place for end user questions. When this is a development question, then please line out the current code you have and provide a meaningful problem description. Cheers, Ferdinand
  • 0 Votes
    2 Posts
    916 Views
    ferdinandF
    Hey @moghurt, Thank you for reaching out to us. I tried using the pyp plugin to execute Python scripts when starting the software to modify the project file, but when I use the '-render' parameter, the Python code in the pyp plugin is executed after the rendering is complete. I can only speculate as to what exactly you have been doing here, as you do not provide any details or code. Please have a look at Support Procedures: Asking Questions for how to ask good technical questions. The general workflow for what you want to do here (given that one really wants to follow the plugin route) would be to implement PluginMessage for your plugin, and then try to run your code from there at a fitting point of time in the startup sequence of Cinema 4D. And while I would not rule out that -render has an impact on the startup sequence of Cinema 4D, the general claim that your Python code only runs after the rendering seems a bit far fetched. Because for events such as C4DPL_INIT_SYS and C4DPL_INIT modules and plugins have not been loaded yet, i.e., rendering is literally impossible at these points. The plugin approach also assumes that you can inject without problems alien command line arguments into a Cinema 4D app call, e.g., \CINEMA 4D.exe"-nogui -render "render.c4d" -script "myscript.py" with -script being the alien argument. I am not quite sure that this would work, I would have to try myself. What also is problematic, is that you are likely not able to get hold of the render document on this route. The active document will be the empty document, not the render document, i.e., you cannot get hold of the BaseDocument for render.c4d. And you cannot just open and modify the document yourself, as Cinema might have already a lock on that file or is even already loading it. All this makes using c4dpy instead much more attractive as you won't have these problems there. It is also the intended solution for what you want to do here: Modify one or many documents without a GUI in a fire and forget manner. A while ago we had the topic Extending the Command Line with Python where I showed a workflow for how to treat c4dpy as a Script Manager environment. The thread is four years old, written in Python 2 syntax (you will have to convert to Python 3 syntax), and I was then not yet a Maxon employee but a student. So, you might run into some issues. But the principle is definitively reproduceable and I also do not see anything in my old code which seems like a really bad idea. Your workflow could then look like this for doing the pre and post rendering events (as a bat, ps1, sh, or command file and assuming that you do not want to overwrite files): c4dpy script_manager_environment.py -script my_script.py -in my_doc.c4d -out my_doc_pre.c4d CommandLine -my_doc_pre.c4d ... c4dpy script_manager_environment.py -script my_script.py -in my_doc_pre.c4d -out my_doc_post.c4d Cheers, Ferdinand
  • 0 Votes
    3 Posts
    955 Views
    mikeudinM
    @ferdinand Thank very much! i'll check what can i do.
  • GetCache Does Not Work Inside the Python Generator

    Cinema 4D SDK r21 r25 python
    10
    0 Votes
    10 Posts
    2k Views
    ferdinandF
    Hey @bentraje, I am glad that you found your solution, and yes, you are absolutely right, it should be GeGetCurrentThread . I fixed that in my pseudo-code. Cheers, Ferdiand
  • 0 Votes
    4 Posts
    1k Views
    B
    @ferdinand yea python is much more forgiving than C++. i was just wondering if there was an already existing API for such task.
  • Breaking Tags Out Of A Shared Folder

    Cinema 4D SDK r21 sdk c++
    3
    1
    0 Votes
    3 Posts
    819 Views
    J
    Thanks for the response, that's what I was afraid of. John Terenece
  • 0 Votes
    3 Posts
    674 Views
    J
    Thank you Ilia, Let me digest your extremely kind advice and example, learn from it, and come back tom you. Kind regards, James.
  • 0 Votes
    3 Posts
    720 Views
    T
    would love to see that being added. the HUD is amazing for internal tooling
  • Updating my r20 C++ plugins to r21 and up

    Cinema 4D SDK
    9
    0 Votes
    9 Posts
    2k Views
    R
    @kbar, thank SO MUCH. I will look into it.
  • After id exeetzer axis alignment

    Cinema 4D SDK r21 python
    4
    2
    0 Votes
    4 Posts
    870 Views
    ferdinandF
    Hello @WDP, Please excuse the very long delay, but I have to overlooked your answer here. But as stated in my initial posting, we can only provide support on concrete technical questions. If I remember correctly, there was another thread preceding this one where the same rule had been lined out, which is why I was as strict in my answer here as I was. And while we understand that this line of questions usually does not come from a bad place when asked by less experienced Python users, we ultimately cannot provide full solutions or even write applications. What might get you (and other information seekers) started on this subject is the operation_transfer_axis_s26.py code example, as it manipulates the "axis" of an object. I have closed this topic due to the lack of an eligible support request. Please feel free to open a new question when you have tangible coding problem for that subject. Cheers, Ferdinand
  • Floating license problem

    Moved General Talk
    2
    0 Votes
    2 Posts
    650 Views
    ferdinandF
    Hello @fss, Thank you for reaching out to us. We unfortunately cannot help you with this question here in the SDK Team as you are asking effectively for a feature in the Maxon App. While the C++ SDK has some licensing features, they are restricted to reading data, so you cannot just call an API to release the licenses yourself. You should ask your question to user support, because they are the right place for things concerning the Maxon App. What you might want to clarify there is what you mean by "defunct instances" and which app you are using. I assume from the context that you are using c4dpy with some Python scripts which sometimes crash c4dpy and then the license is not being released correctly. Which sounds like a bug which you then should report to user support. Cheers, Ferdinand
  • SetTime() and document updating

    Cinema 4D SDK python r21
    12
    0 Votes
    12 Posts
    2k Views
    ManuelM
    @brucek5 said in SetTime() and document updating: It sounds like 'op' is similar to 'this' in c# op is a pre-defined variable. Using a tag to script your python, op point to the tag itself. But using the visual selector, op will point to the object in the link and could be None. You can have a look at our manuals page where you will find Python Scripting Nodes that will give information about pre-defined variables for each node where you can use python. Cheers, Manuel