• 0 Votes
    15 Posts
    446 Views
    ferdinandF
    Hey @spedler, I did give this a shot. I cannot reproduce this after even quite a few attempts, but one of my colleagues (Fritz) could. There is probably some undo code missing in the color chip dialog. I assume that was what you did, Steve, right? You set the color via the popup color chip dialog and not with the inline control? Fritz could reproduce this without your plugin. So, my hunch was right, your plugin is not the culprit. Since I cannot fix what I cannot reproduce on my machine, I have created a bug ticket for this and sent it off to the owners of the COLOR control. The ticket is ITEM#652737 Parameters of type COLOR do not always correctly invoke UNDOs in descriptions. Out of curiosity: Can you also reproduce this on your machine with a a builtin object, e.g., the Cube object? Fritz and I were both on macOS while testing. But this being OS-specific seems a bit unlikely. Cheers, Ferdinand I have moved this topic into "bugs". edit: As always with these things now I can reproduce it too
  • 0 Votes
    12 Posts
    680 Views
    ferdinandF
    Hey @ThomasB, so I did a clean writing of your plugin demo code in preparation to debug the output and I cannot reproduce the issue you report. For me the light works. There were some issues with your code, but none of them should cause the light to malfunction as your reported on LoadDocument. What you did there with self.container was a bit dicey and could have caused the issue but it seems somewhat unlikely. I am today on my Mac, it seems quite unlikely that this is an OS related issue. The object after pressing the button in your plugin: [image: 1784573182532-f6aea3b3-a566-4779-99f4-e71a61cea4f0-image.png] And the object after collapsing it: [image: 1784573259288-56138dee-a9f5-415d-bc69-19e0a7695df1-image.png] Cheers, Ferdinand from c4d import plugins, bitmaps, BaseObject, GeListNode import c4d import mxutils import os PLUGIN_ID: int = 1000200 PY_ADD_LIGHTS: int = 10000 class RedshiftLightsTest(plugins.ObjectData): """ """ HOUSE_PATH: str = os.path.join(os.path.dirname(__file__), "res", "models", "build_1.c4d") def __init__(self) -> None: """ """ self.SetOptimizeCache(True) self._asset_doc: c4d.documents.BaseDocument | None = None # No, never store a reference to what you return as your cache in GVO! # self.container = None def Init(self, op, isCloneInit: bool = False) -> bool: """ """ if not os.path.exists(self.HOUSE_PATH): raise FileNotFoundError(f"House model not found at {self.HOUSE_PATH}") # For cloning it would be better to copy over the document to avoid reloading it, but since # we do not implement NodeData.CopyTo() we will just reload it for now. self._asset_doc = mxutils.CheckType( c4d.documents.LoadDocument(self.HOUSE_PATH, c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS)) return True def GetAssetPayload(self) -> c4d.BaseObject | None: """Returns a copy of the asset payload for the plugin. """ if not isinstance(self._asset_doc, c4d.documents.BaseDocument): raise RuntimeError("Asset not loaded correctly.") # Should not happen, but just in case. root: c4d.BaseObject = self._asset_doc.GetFirstObject() if not root: raise RuntimeError("Asset document has no root object.") payload: c4d.BaseObject = root.GetDown() if not payload: raise RuntimeError("Asset document has no payload object.") return payload.GetClone() def GetVirtualObjects(self, op: BaseObject, hh: object) -> BaseObject | None: """ """ # Return the cached object if it is not dirty, otherwise rebuild it. dirty: bool = op.CheckCache(hh) or op.IsDirty(c4d.DIRTYFLAGS_DATA | c4d.DIRTYFLAGS_ALL) if not dirty: return op.GetCache(hh) # Returning None in an ObjectData.GetVirtualObjects() call will tell Cinema that a memory error # occurred, and with that cause Cinema to stop calling/building the object. This is almost never # what we want, return a Null object instead. null: c4d.BaseObject | None = c4d.BaseObject(c4d.Onull) if not null: return c4d.BaseObject(c4d.Onull) payload: c4d.BaseObject | None = self.GetAssetPayload() if payload: payload.InsertUnder(null) return null def Message(self, node: GeListNode, type: int, data: object) -> bool: """ """ if type == c4d.MSG_DESCRIPTION_COMMAND: if data["id"][0].id == PY_ADD_LIGHTS: self.ImportLights(node) return True return True def ImportLights(self, node: GeListNode) -> bool: """ """ if not isinstance(node, c4d.BaseObject) or not c4d.threading.GeIsMainThreadAndNoDrawThread(): return False # This is a bit tedious but each of these calls can fail, and you cannot, or better, should # not just do chain calls such as GetDown().GetDown().GetNext().GetNext(). One could abstract # this away with a function such as Traverse(node, "DDNN") where D = Down, N = Next, but for # this example I just did it manually. doc: c4d.documents.BaseDocument = node.GetDocument() if not doc: return False payload: c4d.BaseObject | None = self.GetAssetPayload() if not payload: return False down: c4d.BaseObject | None = payload.GetDown() if not down: return False item: c4d.BaseObject | None = down.GetNext() if not item: return False light: c4d.BaseObject | None = item.GetNext() if not light: return False clone: c4d.BaseObject | None = light.GetClone() if not clone: return False doc.InsertObject(clone) c4d.EventAdd() return True if __name__ == "__main__": path, file = os.path.split(__file__) file = "icon.tif" new_path = os.path.join(path, "res", file) bitmap = bitmaps.BaseBitmap() bitmap.InitWith(new_path) plugins.RegisterObjectPlugin(id=PLUGIN_ID, str="redshift_lights_test", g=RedshiftLightsTest, description="redshift_lights_test", icon=bitmap, info=c4d.OBJECT_GENERATOR)
  • GetWorkplaneMatrix is broken in Cinema 4D 2026.3

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

    Moved Bugs 2026 python
    5
    0 Votes
    5 Posts
    656 Views
    ferdinandF
    Hey, good news, this is fixed in the upcoming hotfix (2026.3.2).
  • 0 Votes
    1 Posts
    263 Views
    No one has replied
  • 0 Votes
    17 Posts
    2k Views
    ferdinandF
    @ThomasB That is not a misunderstanding. I am aware that MRDs can only see their own tickets. But we still needed that crash reported, so I did it. I would have done the same if you would not have been an MRD. I usually mention ticket IDs here so that I can come back and close bugs. As you might have noticed, I have moved this into the Bugs forum. You do not have to do anything regarding that ticket, it it inaccessible for non-Maxonians. But we are still very much interested in a version of your plugin or a workflow which caused the crash. Otherwise we will not be able to reproduce and fix the issue. When you cannot provide it, this is also not a biggie (please do not waste time on this), then we have at least documented that there is somewhere a problem with audio tracks and how they handle memory while post-processing audio; in case we run into the same issue in the future in another context. Cheers, Ferdinand To share plugins with us, you can either use a chat on backstage or send us a mail to sdk_support(at)maxon(dot)net. There is a good chance that when you use a binary data attachment in a mail, that our mail system will filter out that attachment. When you use backstage (and upload the plugin there in a chat) that data would be permanently in the assets of that forum. When you just give us a link, we will delete your data once we do not need them anymore for debugging.
  • How to export icons of asset

    Cinema 4D SDK python 2026 2024
    8
    0 Votes
    8 Posts
    1k Views
    DunhouD
    Hey @ferdinand , Sorry I forgot click Submit button well, that is the info I need, I use same tech to get icons for CMD, and now waiting for svg part in the future. Cheers~ DunHou
  • How to draw svg to bitmaps?

    Cinema 4D SDK windows python 2026
    4
    0 Votes
    4 Posts
    681 Views
    ferdinandF
    I started to work last Friday on a BaseBitmap.InitWithVectorImage. It will for sure not make it into the next release of Cinema 4D, as we are too close to that, and I cannot make any promises when or if it will arrive. But I see value in this especially since I realized that you cannot even really use this in C++, as VectorImageInterface requires access to some internal components to be rasterized.
  • 0 Votes
    3 Posts
    562 Views
    rndm_cgR
    @ferdinand thanks so much, problem solved!
  • Can we draw alpha image in viewport

    Cinema 4D SDK windows python 2026
    4
    0 Votes
    4 Posts
    664 Views
    ferdinandF
    I do not think that DRAW_ALPHA_FROM_IMAGE should not work. I just picked DRAW_ALPHA_NORMAL because it is the "most default one" out of the DRAW_ALPHA flags. I will have a look later. But you can for now probably just use DRAW_ALPHA_NORMAL.
  • How to add tabs to tool plugins.

    Cinema 4D SDK windows python 2026
    6
    0 Votes
    6 Posts
    864 Views
    ferdinandF
    You very likely have not unpacked your resources. The resource folder found in an installation only contains a part of the application resources (we are doing this since release 2023 if I remember correctly). A good portion of the resources sits inside resource.zip for performance reasons and is unpacked on demand. You can just unpack the resource.zip into you resource folder without an performance or stability issues. [image: 1779175199591-b8e8db94-ae20-42b4-9a5d-e92ac928e89d-image.png] You as an MRD can also look at the Bugslife client, as it is probably the better example, as it uses more features of the quick tab GUI. But my answer above was targeted at a general audience who can see the resources for Bugslife but not Bugslife itself, and it therefore is not a good example for them. Just grep the resource folder as I did in my screen for files that match the path dialogs/*.res (i.e., are res files for dialogs) and contain the word QUICKTAB. Cheers, Ferdinand
  • 0 Votes
    6 Posts
    999 Views
    AnlvA
    Another small tip: you can simply use a single <br> for line breaks — there’s no need to use <b> or </b>. Also, just like in the script example, scripts can support localized language strings as well: """ Name-US:Example Name-CN:示例 Description-US:Example line 1.<br>Example line 2.<br>Example line 3. Description-CN:示例第 1 行。<br>示例第 2 行。<br>示例第 3 行。 """
  • Executing a Redshift texture bake from Python

    Cinema 4D SDK python 2026
    2
    0 Votes
    2 Posts
    502 Views
    ferdinandF
    Hello @mplec1, 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 The bake tag and by extension cinema::BakeTexture (and its Python equivalent c4d.utils.BakeTexture) unfortunately do not support Redshift, even for the older Xpresso based materials. Redshift uses the tools found in Redshift/Tools/Texture Baking for baking. And while you can programmatically create a bake set and then programmatically click the 'Bake' button in it (which both would also work in a headless version of Cinema 4D, such as c4dpy), the following dialog which opens to set baking details and actually start the rendering is sealed, i.e., you cannot interact with it from the public API. And opening such dialog would also fail in a headless Cinema 4D instance. So, I am afraid there is currently no solution for your problem. You can technically export the whole scene to a format such FBX or USD, and use the builtin baking output (which would also work in a headless environment, as long as you do NOT pass SAVEDOCUMENTFLAGS_DIALOGSALLOWED to the save/export operation). But the output of that automated baking is often of poor quality compared to manually baking object(s) via bake sets. Cheers, Ferdinand
  • 0 Votes
    6 Posts
    983 Views
    ferdinandF
    Your approach is not necessarily worse, one could even argue that it is better. I personally would always avoid manually binding to an OS DLL via ctypes, but that is more a personal preference.
  • 0 Votes
    2 Posts
    504 Views
    ferdinandF
    Hello @vaishhg, Thank you for reaching out to us and your comprehensive yet sparse problem description, this really makes things easier for us. The problem is a bit that you somewhat forgot a crucial part: The scene data :). You provided this: Create a Cinema 4D scene with a Main take (frame range 0-6) Create child takes (V, E, R, A) and override the render data's frame range on each (e.g., V: 0-9, E: 0-23, R: 0-13, A: 0-17) But I cannot recreate a scene with these instructions, unless you meant the second step in a rather metaphorical way (switching the render data itself via takes). I also talked with some of our support specialists, and the consensus seems to be that what you claim to be the case - a scene with take overwritten FROM/TO values - is not possible. What you can do, is create multiple render settings and then activate them via takes. But Takes are a tricky subject, and I would not rule out that you somehow found a way to create take overrides for parameters of a render data instance. If so, please share the scene. Find also a scene attached which demonstrates what I discussed above: A scene that switches the active render data based on takes. It will print this with your script: Take 'Main': FRAMEFROM=0, FRAMETO=90 Take '0_45': FRAMEFROM=0, FRAMETO=45 Take '0_90': FRAMEFROM=0, FRAMETO=90 take_renderdata.c4d So, to formally answer your main question: When my assumptions above are true, your scene is printing the same values because each take does have the same values, as these two parameters are not directly overridable. Cheers, Ferdinand
  • NETWORK_CONNECTTIMEOUT with SSL

    Cinema 4D SDK 2024 c++ 2025 2026
    5
    0 Votes
    5 Posts
    688 Views
    R
    For now I am good. If I need further help, I will send the endpoint and function by email.
  • Create Motion Clip Source with Python API

    Cinema 4D SDK python windows 2026
    3
    0 Votes
    3 Posts
    982 Views
    J
    Hi @ferdinand, and thank you! Your proof-of-concept and pointing me toward mxutils.GetSceneGraphString() was exactly what I needed to solve this. By using the scene graph dumper on a native UI-generated Motion Source from a rigged character, I realized it's just a standard Ojoint hierarchy with normal CTrack objects. I used GetClone(c4d.COPYFLAGS_NO_HIERARCHY) to perfectly replicate the Ojoint skeleton and injected the time variables into the container, and it maps and plays back perfectly. Thanks again.
  • Batching Slider messages

    Cinema 4D SDK c++ 2026
    5
    0 Votes
    5 Posts
    692 Views
    SteveHill3DS
    Thank you. MSG_DESCRIPTION_USERINTERACTION_END is just what was needed.
  • Advice on implementing undo/redo in a Tool

    Cinema 4D SDK c++ 2026
    5
    0 Votes
    5 Posts
    629 Views
    ferdinandF
    Hey @SteveHill3D, Storing a tool state in a tag is possible, but a bit unusual. But generally you are on the right track. Tags are also internally often used as hidden data containers. When you write a modelling tool, you probably already found out that points and polygons are are actually stored in hidden tags on objects. I am not sure though if using tags in tools is a good advice, as injecting all that data all the time into the scene graph is probably not the fastest. It depends a bit on what you are doing, but in general the solution is a bit unusual. Cheers, Ferdinand
  • Tile rendering with Cinema 4D

    Cinema 4D SDK python 2026
    7
    0 Votes
    7 Posts
    2k Views
    ferdinandF
    Hey, just as an FYI, I added this as an example to the 2026.2 rendering examples. You will be able to find it under \scripts\04_3d_concepts\rendering\render_document_tiles_2026_2.py. Since the script will use some 2026.2 features, it does not make much sense to post a preview here, as you will not be able to run it right now. The example also does the kernel border thing we discussed here. Cheers, Ferdinand