• 0 Votes
    5 Posts
    1k Views
    ferdinandF
    Good to hear that you found your solution!
  • 0 Votes
    7 Posts
    1k Views
    justintaylor-devJ
    @ferdinand Great thanks!
  • 0 Votes
    4 Posts
    1k Views
    M
    Hi just to let you know that the bug has been fixed, this will be available in one of the next releases. I will post on this topic once the fix is available. Cheers, Maxime.
  • 0 Votes
    3 Posts
    775 Views
    B
    @ferdinand Gotcha. Thanks for the response. c4d.CallButton(op, c4d.ID_BASEOBJECT_FROZEN_RESET) works as expected.
  • Embed Video into GUI - Python API

    Cinema 4D SDK python windows
    6
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hey, okay, good to know. I just wanted to make clear that BaseBitmap does not support audio playback or sampling audio information. Except for the SoundEffectorCustomGui, there is in fact no sound support at all in the Python API. The C++ API offers more support with the MEDIASESSION namespace, but also this is mostly geared towards writing such information. Cheers, Ferdinand
  • 0 Votes
    3 Posts
    622 Views
    O
    @i_mazlov This is very useful as it helps avoid manually inputting hard-coded index values! Thank you, and have a great day!
  • 0 Votes
    5 Posts
    2k Views
    M
    Thank you for the valuable information. Implementing CreateSceneFromC4D() appears to be what I am missing. Since we never cared about skeletal transforms, we were relying on, as you put it, the fastest way to extract the actual geometry of the object, which was working really well for the previous simpler cases. I'm currently working on other tasks, so, I haven't validated everything yet, but this seems to be the solution. I won't hesitate to ask if I run into other problems when I return to the importer, but this looks doable now. Thanks again for the help!
  • Retrieving a shader from a LayerShaderLayer

    Cinema 4D SDK windows c++ 2024
    12
    0 Votes
    12 Posts
    2k Views
    S
    Hi Ferdinand, That’s great, really very helpful, thank you. I’m glad my code was right in principle even if it didn’t work! I would never have guessed the layer returned a void pointer. That should now work perfectly and do exactly what I need. Thanks again for taking the time to look into this, very much appreciated. Cheers, Steve
  • 0 Votes
    3 Posts
    763 Views
    O
    @i_mazlov Thank you
  • How to Undo Switching Between Modes?

    Cinema 4D SDK windows 2024 python
    10
    0 Votes
    10 Posts
    2k Views
    B
    @ferdinand said in How to Undo Switching Between Modes?: Well, just move the code which switches the mode to the end of your code when it is only cosmetic anyways. As I said above, a sensible way to use SetMode is when you want to leave the user in a state where he or she can continue working right away. But you can then just run all your code, check if everything went fine and then set your code. Otherwise you never set the mode, and therefore also have nothing to revert. It's a matter of workflow. It's not simply for checking the code that it's working properly. It's about a workflow. The workflow in the example is Select some mesh components, run the command. It generates something for you and switches the mode for you. If you selected the wrong components, you'd undo and try it again. But the undo won't put you back in the component mode. The issue is that that part of the command is not undoable so it's does hinder the workflow just a bit. I'm not necessarily advocating that it should be undoable or anything like that, just explaining the reasoning in this example and the value if it were undoable.
  • How to simulate "Cappucino" behavior?

    Cinema 4D SDK windows python 2024
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    PS: I would test this on heavy scenes with a lot of animations, to see if you get at least one data point for each frame (or whatever value you would consider acceptable).
  • 0 Votes
    3 Posts
    626 Views
    DunhouD
    Hey @ferdinand , oops, I have an impression of this topic and tried to recall it, but I couldn't find any keywords in my mind at the time. I must have gone crazy. And the key is the GetData(), I have no concept of file composition and did not realize that what is returned here is the data required for an image file. Thank you very much. Cheers~ DunHou
  • 0 Votes
    4 Posts
    1k Views
    i_mazlovI
    Hi @justinleduc , Great to hear your issue was resolved! Special thanks on sharing your solution with the community! Regarding compiling issues you had: Error C2440: <function-style-cast>: cannot convert from AutoAlloc<ColorProfile> to GeData The AutoAlloc wrapper is just a convenient wrapper for a raw pointer. Hence, to fix your issue you just had to dereference the pointer: CheckState(colorProfile); settings.SetData(BAKE_TEX_COLORPROFILE, GeData(*colorProfile)); Cheers, Ilia
  • 0 Votes
    3 Posts
    619 Views
    kangddanK
    @ferdinand Thank you !
  • 0 Votes
    11 Posts
    3k Views
    E
    @ferdinand Wow, thanks a ton for that! Our workflow was working just fine without c4dpy, so I didn't get to check the forum again, but this is very nice. Happy new year!
  • How do I create a Plugin Identifier?

    Cinema 4D SDK windows python 2024
    14
    0 Votes
    14 Posts
    2k Views
    ferdinandF
    Hey @shir, good to hear that you solved the issue. Maybe NodeBB has an issue with the specific (top level) domain your mail handle was under? I just checked the logs and this is the event for the second registration mail that has been sent out (I edited your mail handle for privacy reasons). I.e., this is the one I manually invoked. There is another event for your actual registration. As far as NodeBB is concerned, it seems to be convinced that it successfully sent these mails. { "confirm_code": "dbcc0d6c-8646-4191-9975-badc1c7035f2", "email": "[email protected]", "subject": "Welcome to PluginCafé", "template": "welcome", "timestamp": 1751883962965 } NodeBB can be a bit buggy from time to time but that it fails to send a mail and then creates an event for successfully sending it, would be a bit odd. I will have an eye on this. Cheers, Ferdinand
  • 0 Votes
    4 Posts
    822 Views
    i_mazlovI
    Hi @ezeuz, Great to hear you've figured it out and thanks for sharing the solution with the community! Cheers, Ilia
  • Get information about BasePlugin

    Cinema 4D SDK windows python 2024
    8
    1
    0 Votes
    8 Posts
    2k Views
    gheyretG
    Thanks for your explaination @ferdinand Now I understand what's going on here. Cheers!
  • vcxproj toolset configuration

    Cinema 4D SDK windows c++ 2024
    3
    0 Votes
    3 Posts
    698 Views
    Y
    @ferdinand Thanks for reply. I think I understood it. As an workarround, I can replace all the v142 in generated vcxproj with v143. I'm not using VS IDE , so I have to do it manually.
  • 0 Votes
    2 Posts
    1k 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