• Clearing the list of a ComboBox (Dropdown) - Python API

    python
    3
    0 Votes
    3 Posts
    662 Views
    E
    @ferdinand Thanks a ton again! Yeah that dynamic UI is indeed something that fits perfectly with my current case, and possibly some other features I want to implement. Tho, I will revisit it later once I get to creating an MVP for my plugin. So I will use FreeChildren() for now.
  • Memory Leak? How to fix loosing memory with python generator?

    python macos 2024
    5
    0 Votes
    5 Posts
    1k Views
    M
    Hi sorry for not answering this topic earlier, I finally found some time to investigate and sadly there is nothing you can do in your side, this memory leak is coming from the Illustrator Importer and can be big, since all the points and tangents of the file are leaking. A fix will be available in the next update. Thanks for the report ! Cheers, Maxime.
  • 0 Votes
    4 Posts
    1k Views
    S
    @ferdinand Just ran into the same problem. Thank you for the solution!
  • Populating a Bitmap Shader without a file

    c++
    10
    0 Votes
    10 Posts
    2k Views
    D
    Hey Ferdinand, thanks again for the quick reply. What we're going to do is basically have a "cache" location, as you said, where we will save the users' textures when they bake the stack. I would also prefer the approach you showed using the document's asset repository, but since the textures might be very heavy, it would probably lead to very large document sizes for a lot of users, especially if they use several textures/have several stacks with textures. I'm working on implementing solution 1.1, using the Message system to move things around. However, thank you very much for the code example, I will probably use something similar with other assets that are not as large as textures. Cheers, Daniel
  • 0 Votes
    5 Posts
    1k Views
    i_mazlovI
    Hi @mikeudin , To me it sounds pretty much like this issue here: issue with inserting fieldlayers in r2024, particularly after I couldn't reproduce this issue with the internally available next version of cinema. Cheers, Ilia
  • Tool Tabs and foldable groups

    python
    2
    0 Votes
    2 Posts
    478 Views
    ferdinandF
    Hello @BretBays, Thank you for reaching out to us. Please provide code and a clear problem description as statements like `How do you create the tabs ... I tried X but it only creates tabs' are a bit confusing for us. There are two ways to create tab interfaces, one is via groups and the method GeDialog.TabGroupBegin and the other one is via CUSTOMGUI_QUICKTAB. We have a code example for it in Python here. The "tab-look" of descriptions, i.e., what you usually see in the Attribute Manager, is achieved with CUSTOMGUI_QUICKTAB. There is no group folding in dialogs anymore, this feature has been deprecated (we probably should update the docs). There is a difference between dialogs and descriptions. They use similar UI elements but they are not the same. Folding in descriptions is still supported, in dialogs not (but you can implement it yourself when you really need it). You should also be aware that there are ToolData and DescriptionToolData plugins. The former tool type uses dialogs to display its UI in the Attribute Manager, and the latter uses descriptions. Most tools these days in Cinema 4D are implemented as DescriptionToolData which leads to a distinctive look and set of features which are not trivial to emulate with a plain ToolData. ToolData is exposed in Python and C++, DescriptionToolData is only exposed in C++. My colleague @m_adam likes to point out whenever this subject comes up that the type SculptBrushToolData is exposed in Python (which is derived from DescriptionToolData) and that you can (ab)use it to implement a DescriptionToolData in Python. I never tried doing that and what consequences that would have (and neither did Maxime AFAIK). For my taste that would be way too hacky, and I would rather just live with the minor restrictions of ToolData plugin and its dialog based UI. Cheers, Ferdinand
  • 0 Votes
    6 Posts
    1k Views
    O
    Thanks a LOT @ferdinand and @mikeudin , for sharing your insights and suggestions! They are definitely valuable and am sure will come in handy in the future!!!
  • How to check if document is rendering?

    python
    6
    0 Votes
    6 Posts
    1k Views
    P
    Hey sorry for gravedigging. i have the problem that my tag plugin recognises the difference between rendering and not rendering. unfortunately it also always changes the state in the doc itself and not only in the doc that is rendered [image: 1720870787719-6484d884-61c7-454c-a256-0f1167238772-grafik.png]
  • BitmapButton not work

    2024 python
    5
    1
    0 Votes
    5 Posts
    826 Views
    chuanzhenC
    @ferdinand Thanks
  • why my interface is sealed in maxon::Result?

    r25 c++
    4
    0 Votes
    4 Posts
    728 Views
    Y
    @ferdinand cool. this really helpful!
  • Get information about BasePlugin

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

    windows c++ 2024
    3
    0 Votes
    3 Posts
    542 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.
  • Programmatically drawing a brush stroke

    windows c++ 2024
    4
    0 Votes
    4 Posts
    856 Views
    justinleducJ
    Thanks a lot for confirming my doubts, @i_mazlov. I'll find a compromise, but I can't help but express how great it would be if BodyPaint exposed such functionality. The Brush tool and its filters (such as "Smudge") can't be replicated with a simple bitmap texture, and gaining access to it (mind you, in the context where the Paint brush can be programmatically moved/dragged across the UV space) would open the door to so many creative and useful applications. Of course, I'm sure you are already aware of all of this. This is just me casting a single vote for a potential addition of the Brush tool to the SDK in the future. Thanks for everything!
  • Is project tool guaranteed to be backward compatible?

    c++
    3
    0 Votes
    3 Posts
    499 Views
    B
    Thank you very much for the clarifying, @ferdinand
  • 0 Votes
    2 Posts
    928 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
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    24 Views
    No one has replied
  • Change texture node colorspace

    2024 python windows
    6
    0 Votes
    6 Posts
    873 Views
    ferdinandF
    Please open a new topic for new subjects. See our Support Procedures: Asking Questions. GetBit is a BaseList2D method, your node is not a BaseList2D.
  • Manipulate timeline from plugin

    macos c++ 2024
    2
    0 Votes
    2 Posts
    490 Views
    ferdinandF
    Hello @veenamandhan, 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 First of all, you first posting is a violation of our "one subject per topic" rule. When you have questions about multiple subjects, you must open multiple postings. For details on this subject, please see Support Procedures: Asking Questions. We usually cut newcomers some slack in this regard as they cannot know our rules in advance and one usually also has more questions than there are atoms in the universe when starting out with a new API. But we must ask you to conform to this rule in future postings. Regarding your questions: It depends a bit on what you would expect from an "audio input field", but generally, yes. We have the FilenameCusstomGui and the SoundEffectorCustomGui. The former is for letting the user select arbitrary files, the latter is a specialized GUI for sound files (but also hooks into tracks). In the end this also depends a bit on what plugin type you want to use, because not all plugins use the same GUI paradigms. [image: 1718883285369-352630af-9dba-4e39-ac71-5f40da6d26ab-image.png]. Yes, that is possible. You are however bound by the threading restrictions here as inserting tracks (your "audio") means modifying the scene graph. Which in turn means that you cannot do this in any of the major payload methods of scene element plugins like ObjectData::GetVirtualObjects, or TagData::Execute as they all run off-main thread. You can do this with all plugin types but for scene elements (everything derived from NodeData) you must usually be a bit more careful, as a lot of methods are there being called in parallel. That is a very ambiguous question. I am not really sure what you mean with "custom boxes like asset boxes", but in general you can implement any kind of custom GUI you want in C++. It again depends a bit on the plugin type you use. For dialogs, custom GUIs are realized by GeUserArea, for descriptions, i.e., stuff in the Attribute Manager, you will have to implement a CustomGuiData (and possibly a custom data type). The GUI paradigms manual is here also entry point for this subject. In general I would recommend opening a thread for each of these subjects, as this thread will become otherwise very convoluted and hard to read and understand for both you and future readers. Before you do that, I would however recommend that you start a thread asking for help which plugin type to choose, while briefly explaining what you want to do. Cheers, Ferdinand
  • How to Set Void Type Attributes in GraphNode?

    python 2023 2024
    6
    0 Votes
    6 Posts
    1k Views
    E
    @m_adam Thank you for providing an alternative method to set parameters.
  • Multithreading/waiting for render to complete

    windows python 2024
    5
    0 Votes
    5 Posts
    997 Views
    B
    Thank you so much! That was it. I was thinking I would try to create this standalone, before moving it into creating a GUI, and I didn't know about the Timer in GeDialog. This is now working, and all I needed to do is remove the multithreading and change it to the timer.