• 0 Votes
    3 Posts
    179 Views
    ferdinandF
    Hello @mogh, please excuse the delay. Without your plugin this is not easy to answer. Your GetState looks okayish to me, the GetActiveObjects and c4d_progressbar (I assume this is a helper for our status bar methods) calls are not great as GetState can be called quite often, but I would not expect this to be a huge bottleneck unless the scene is really large (GetActiveObjects implies traversing the scene). The Message function however is not great. You free there without any safe guard (except for the document mode condition) your tool. Not only would the tool freeing then happen under a random message context, freeing a tool is also something that you can only do on the main thread (see the all new Scene Execution manual), as something could still work under the assumption that this tool is active. So, you would at least also have to add a main thread check there. But even then I would consider this not great code, as this is a bit awkward place to free a tool. Both methods do not look essential to the operation of a plugin. Did you try to remove code or methods to see what exactly makes it slow? Your second code listing looks much less rogue. As a tip I would still add an GeIsMainThreadAndNoDrawThread to your MSG_DOCUMENT_MODE_CHANGED condition. It is very likely that this message is only sent on the MT, but there can always be rogue plugins (or bad Maxon code) which violate such assumptions. Cheers, Ferdinand
  • 0 Votes
    9 Posts
    345 Views
    sohrabroshanaeeS
    Hey Ferdinand, Thanks for replying back. I initially wanted to use the Xpresso system, but I couldn’t find a way to implement some of the interactions I want, such as double-clicking a node to select its corresponding object in the Object Manager or material in the Material Manager. Then I tried example.nodes from the SDK package. I managed to represent the relationships using nodes and connections, but the graph is still hosted by a material and accessed through the material node context. FLOW scans existing scene dependencies and displays them as a graph. Each node represents an existing object, tag, material, or named data reference. The viewer needs to follow the scene selection and let users navigate back to those scene elements. What I’m trying to achieve is an independent FLOW editor that can display this graph directly, without requiring a material to own it. That’s the independence I currently have with the HTML canvas. From your explanation, I understand that the public SDK doesn’t currently expose the native Node Editor for that use case. Have I understood that limitation correctly, or is there a supported hosting approach I’ve overlooked? here is the result of node editor (MATERIAL) [image: 1795296338197-14439899-99dd-4c79-9f1e-f3e8b8d5802f-image.png] here is my HTML [image: 1795296421733-fa8b331f-499b-49f6-b04d-070a5927269e-image.png]
  • 0 Votes
    5 Posts
    257 Views
    ferdinandF
    Hey @hey2495, okay, this changes things a bit. I also overlooked the SetCursorPos in your first posting, I do not know what you are exactly doing, but setting the cursor position is a bit unusual for a plugin. When you say "G/R/S transform" I assume you are trying to implement some kind of move/scale/rotate gizmo for your tool plugin? And the main issue you currently have is that when you set the cursor, that you read (from your perspective) incorrect input information? As you said it yourself, I would try to switch to input states here rather than events. You gave the special condition that your events are without any button being pressed which is rather unusual for Cinema event polling. I would have to check myself having no pressed button impacts mouse pos polling. I would for sure use here the global input polling (cinema::GetInputState and not the specialization attached to viewports or dialogs. You talk about screen borders and using there a filtered version of the input stream (even when you viewport or dialog seemingly fills the whole screen) does not seem like a good idea. There is EVMSG_ASYNCEDITORMOVE, a core message that is sent when the user moves something in the editor window. Our Cappucino mouse movement recorder tool uses this. Is there a supported Cinema 4D C++ SDK input callback or API that can supply mouse movement during a keyboard-initiated, button-free modal interaction with documented semantics that distinguish real user motion from SetCursorPos()-related repositioning or delayed events? Our input handling is probably about thirty years old (with improvements made along the way). The rigid modern day system boundaries you are asking for (does this and that under these conditions) do not exist. This was written in a time when devs thought using more than one character for a variable name is something offensive When you implement a tool (be it ToolData or ToolDescriptionData), you should use its mouse and keyboard functions to track inputs. Using a scene hook (which would also have dedicated polling functions) and on top manual polling also seems not necessary (but I only have a very superficial view on your project). When you are still stuck, I would recommend sharing a brief executable/compile-able code snippet, so that I can better understand what is going wrong for you. And with executable I mean for example a minimal SceneHook impl that shows your problem. There are so many things that could go wrong for such a delicate issue as yours. But my key idea would be that you might operate on stale data when polling for events instead of states. we want to avoid taking ownership of Cinema 4D's window event loop. This could mean a lot, but a plugin which does runtime monkey patching is not allowed. Maybe I am misunderstanding you here, but at face value, 'taking ownership of Cinema 4D's window event loop' is absolutely off limits and we will ban any plugin ID and their owners who would attempt to do such openly malicious actions. Cheers, Ferdinand
  • 0 Votes
    5 Posts
    326 Views
    AnlvA
    Hi @ferdinand , Yes, I do need the dimension overlay to coexist with another active tool. The plugin is mainly intended to help adjust objects to realistic dimensions and proportions. When precise dimensions are not required, the overlay helps me quickly resize and place objects in the scene. Once that is done, I can turn off the dimension overlay. The plugin can be enabled or disabled directly and includes some settings, with usage similar to the Symmetry tool. Inactive objects do not display dimension information, and grouped objects are measured as a whole, so the viewport does not become a sea of dimension annotations . Cheers, Anlv
  • 0 Votes
    2 Posts
    198 Views
    ferdinandF
    Hello @hey2495, 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: How to Ask Questions. About your First Question I would try closing the file into which you imported the Alembic file. I just checked it, when I import any Alembic file, Cinema holds a lock onto it while the file into which you imported is still open. That seems to be an Alembic specific behaviour, not to say a bug. But it should be avoidable by simply cloning or merging the imported document, so that you can close the import document. I will give the exchange team a heads up on this. Cheers, Ferdinand
  • 0 Votes
    5 Posts
    398 Views
    M
    Thank you all for your answers. Will test this.
  • c4d.RSCAMERAOBJECT_COLOR_CONTROLS_CURVE_RGB

    Cinema 4D SDK python 2026 c++
    3
    1
    0 Votes
    3 Posts
    394 Views
    lasselauchL
    Thank you @ferdinand for looking into this, as well as bumping the request to the RS developers. Any update on this would be appreciated! Thanks.
  • Change render Space (Color Profile) - how?

    Cinema 4D SDK 2025 2026 python
    10
    2
    0 Votes
    10 Posts
    935 Views
    ferdinandF
    You likely have to call UpdateOcioColorSpaces, just follow the example. There is btw no guarantee at all that DOCUMENT_COLOR_MANAGEMENT entails a render space of ACEScg. That is just the default, the user could have changed that. I am also not sure what all that RDATA_IMAGECOLORPROFILE code is meant to do. It depends a bit on what your plugin does and what self.IsForceLinear is meant to express. Only so much: An OCIO document does not necessarily entail a bitmap with a non-linear color profile, and OCIO also does not mean that the bitmap has to be 32bit. You are however missing UNDOTYPE_PRIVATE_DOCUMENTDATA undo management for setting the color management.
  • MergeDocument() crash C4D

    Cinema 4D SDK python 2026
    11
    0 Votes
    11 Posts
    1k Views
    chuanzhenC
    @ferdinand Okay, I will handle the plugins and files at an appropriate time.Thanks reply
  • Disable all animation in document

    Cinema 4D SDK python 2026 windows
    5
    0 Votes
    5 Posts
    591 Views
    C
    Hi, @ferdinand and @Anlv this is most awesome! All way beyond my capablities so thanks a lot for the scripts!
  • 0 Votes
    10 Posts
    963 Views
    chuanzhenC
    @ferdinand Thanks for your detailed explanation. Although the precision conversion leading to value changes is not an error, it is indeed not what we want in terms of the results. For example, when dealing with the weight of some points, using SetWeightMap() will update the weights of other points, resulting in numerical changes. Only using SetWeight() can at least ensure that the weights of unoperated points do not undergo numerical changes (but using SetWeight() must tolerate the print warnings outputted by the console)
  • 0 Votes
    3 Posts
    343 Views
    chuanzhenC
    @ferdinand Thanks for your detailed explanation and the implementation of the sorting function. It's very helpful!
  • 0 Votes
    3 Posts
    453 Views
    A
    Thanks Anlv It looks like its adding the emitter into a null is what's causing it. Fixed with deferred CallCommand(1062577) (no sub-id (1067510) silently no-ops). Emitter fields greys if the emitter/group are parented under the setup null or generator. Sibling placement below plugin object + rename works fine.
  • 0 Votes
    3 Posts
    439 Views
    ThomasBT
    @ferdinand Yes, thanks, that indirect answer is enough for me. I was mainly wondering whether a check performed on both the client and the server is robust enough, or if it could be bypassed using Python, for instance. I’m well aware that it can be cracked somehow. I’m also already using ExportLicenses() for my node-locking system in combination. Thanks a lot for your help.
  • 0 Votes
    17 Posts
    2k Views
    ferdinandF
    I tried with a Cube where the only way to change colour is to use the display colour in the basic tab. At first sight this doesn't cause the problem, but in fact it does. Yes, that was what I meant. Thanks for confirming. The issue likely already has vanished in the current alpha, because there I could not reproduce it. But in 2026.3.2 I can. What is a bit odd is that no one seems to have touched the relevant code in the last months. But that is something for the GUI team to figure out.
  • 0 Votes
    16 Posts
    2k Views
    ferdinandF
    This is not common knowledge, otherwise I would have spotted that earlier. So, you are not really expected to know this as a third party dev. You can look at the geometry_caches_s26.py example and there at this line, under [2] I mention that the cache of that object is muted. But that is of course only very indirect information and not enough to deduce this. I think we also talked about it a couple of times on the forum. The flag BIT_CONTROLOBJECT is set on input objects of generators, e.g., the to be extruded spline of an Extrude object, the profile and rail spine of a Loft object, the to be cloned cube and sphere objects of a MoGraph cloner, etc. As shown in the caching example, Cinema will mute the caches of input objects. To be very formal, they are actually built but then again deleted. BIT_CONTROLOBJECT marks such input objects. Your light in that scene should not have that flag, as it is not the input for some generator. But it somehow got it anyway, there is probably somewhere a bug. For normal scene evaluation that bug is also not really a problem (because as you saw from your own test, the light still converted correctly when you inserted it on its own outside of caches). The problems start when that irregularly as BIT_CONTROLOBJECT marked object is part of a cache. 'Make Editable' then incorrectly collapses the cache. Not only does it not stop at nested generators which are incorrectly marked like this, it also seems to apply the cache muting logic for input objects (resulting in the empty null object instead of the content of the cache of the collapsed generator). I already told the relevant devs that I consider this borderline buggy but they do not seem very inclined to do anything about this. What is effectively missing somewhere in cache resolvement is the evaluation if the flag BIT_CONTROLOBJECT 'makes sense on an object'. That is of not so easy to do, as generator - input object relations can be quite complex in Cinema. Which is probably also why the modelling team does not want to touch this. Cheers, Ferdinand
  • GetWorkplaneMatrix is broken in Cinema 4D 2026.3

    Moved Bugs c++ 2026
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    This will be fixed in the next upcoming hotfix.
  • TimeLine DopeSheet not update

    Moved Bugs 2026 python
    5
    0 Votes
    5 Posts
    1k Views
    ferdinandF
    Hey, good news, this is fixed in the upcoming hotfix (2026.3.2).
  • 0 Votes
    1 Posts
    391 Views
    No one has replied