Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Dunhou
    3. Topics
    • Profile
    • Following 2
    • Followers 4
    • Topics 56
    • Posts 273
    • Best 53
    • Controversial 0
    • Groups 0

    Topics created by Dunhou

    • DunhouD

      Can I get keyboard input mode?

      Cinema 4D SDK
      • windows python c++ 2025 • • Dunhou
      4
      0
      Votes
      4
      Posts
      129
      Views

      ferdinandF

      Hey @Dunhou,

      I have edited your posting. It is fine to mention the beta forum, but we would rather not see its name written here.

      When you are talking about 'C++', I assume you are talking here about the Windows SDK/API, as for example GetGUIThreadInfo. I would doubt that you get very far with that here. Cinema 4D is very OS agnostic and we have our whole GUI decoupled from the OS. The little rename window in our tree view control is not an OS rename dialog. I am not even sure if this is something with an HWND handle which you could address so that you could intercept keyboard events to it, or if this is just a virtual window within our API.

      For this IMM thing to work, we would have to use the IME API in Cinema 4D, so that our text edit gadgets support it. I also do not quite understand what you are trying to do. The missing piece is here probably that our text edit gadget does not send its current content to the IME API (at a glance, via ImmSetCompositionStringW as shown here). And as a third party, you cannot really fix that. Because you (a) do not own the implementation and you (b) are not informed about an edit event, so you cannot just write a plugin which sends the object name to the IME API.

      Cheers,
      Ferdinand

    • DunhouD

      How to get explicit import node space?

      Cinema 4D SDK
      • windows python 2025 • • Dunhou
      3
      0
      Votes
      3
      Posts
      137
      Views

      DunhouD

      Thanks @ferdinand for your great solution!

      Cheers~
      DunHou

    • DunhouD

      Graph Description Explicit Connections can not work in 3rd-renderer (Arnold).

      Cinema 4D SDK
      • windows python 2025 • • Dunhou
      5
      0
      Votes
      5
      Posts
      156
      Views

      DunhouD

      Hey @ferdinand ,

      thanks for details.

      Cheers~
      DunHou

      About forum, I can get notification about my own topic, And I clear all the cache, but nothing changed.

      After I tried to reset my account settings manually, then it worked as expected.

    • DunhouD

      Broken Push Notifications

      News & Information
      • information forum • • Dunhou
      5
      0
      Votes
      5
      Posts
      452
      Views

      M

      Hm, interesting, It works now,

      either you did something or the solution is to post a comment to trigger it. Anyway Thanks.
      Cheers mogh

    • DunhouD

      ImportSymbols with single file didn't return as expect.

      Bugs
      • windows python 2025 • • Dunhou
      6
      0
      Votes
      6
      Posts
      733
      Views

      ferdinandF

      FYI: This has been fixed and will be shipped in a future version of Cinema 4D.

    • DunhouD

      Load presets args in python?

      Bugs
      • windows python 2025 • • Dunhou
      7
      0
      Votes
      7
      Posts
      1.1k
      Views

      DunhouD

      It sounds worth a try, but there may be latency issues when it comes to changes, or data changes can be manually processed during the changes

      Perhaps for my needs, I can force the database to be use GetSceneRepository, anyway, it's worth a try. Thank you for your guidance ๐Ÿ˜Š

    • DunhouD

      How to simulate a drag behavior with UA?

      Cinema 4D SDK
      • windows python 2025 • • Dunhou
      5
      0
      Votes
      5
      Posts
      752
      Views

      DunhouD

      @ferdinand said in How to simulate a drag behavior with UA?:

      All it it does when the users starts to drag, according to Maxime, is inject the asset object into the document, make sure there is no object selected and then enable the place tool (and probably set the mouse cursor)

      This is my solution in my mind, definitely take a try after work. ๐Ÿ‘

    • DunhouD

      How to create UV of obj.

      Cinema 4D SDK
      • windows python 2025 • • Dunhou
      4
      0
      Votes
      4
      Posts
      631
      Views

      M

      I use this to Thank You Ferdinand.

      This is how I imagine an SDK example should look like .... a simplest version , an altered simple version and a complex touching the boundaries of the subject.
      I am thankful and praise your work .... !

      cheers mogh

    • DunhouD

      GraphModelInterface.GetNode not worked

      Cinema 4D SDK
      • python windows 2025 • • Dunhou
      3
      0
      Votes
      3
      Posts
      462
      Views

      DunhouD

      Hi @m_adam ,

      Thanks for your reply, it worked well.

      But I still have some doubts about the usage of Node Path, such as how to calculate the port through NodePath instead of concatenating strings (which can easily lead to misoperation).

      There are few examples and answers for NodePath on the forum, and it seems that people rarely use it. Do you have any insights on this, or in other words, what usage scenarios do you think NodePath is more suitable for.

      Cheers~
      DunHou

    • DunhouD

      How to compare a port value has been changed?

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      8
      0
      Votes
      8
      Posts
      1.3k
      Views

      DunhouD

      Wow @m_adam , thanks for that, I'll check this after work!

    • DunhouD

      How does C4DAtom.GetHDirty(c4d.HDIRTYFLAGS_OBJECT_HIERARCHY) work?

      Bugs
      • windows python 2024 • • Dunhou
      4
      0
      Votes
      4
      Posts
      1.2k
      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.

    • DunhouD

      How to simulate "Cappucino" behavior?

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      5
      0
      Votes
      5
      Posts
      909
      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).

    • DunhouD

      Can I convert a BaseBitmap into a Image file in memory?

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      3
      0
      Votes
      3
      Posts
      488
      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

    • DunhouD

      Cinema 4D plugin market and tons of free plugins!

      General Talk
      • plugin-information chit-chat • • Dunhou
      4
      3
      Votes
      4
      Posts
      2.2k
      Views

      DunhouD

      This is current version of plugins manager and growing up plugins!
      Snipaste_2024-05-20_15-54-43.png

    • DunhouD

      UuidInterface.ToString() raise a TypeError.

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      3
      0
      Votes
      3
      Posts
      535
      Views

      DunhouD

      Wow @ferdinand๏ผ

      What a super detailed and super useful information ! Always learning great things from your super user-friendly answers for rookies like me ๐Ÿ‘

      Memory Management is very useful to understand what happened here, I will read it again tomorrow after work, hope I can have a deeper understanding then๐Ÿ˜Š

      About the Interfaces/References/Ref class name, super useful information, I always confused them and thought it was an inheritance relationship or something like that, it is much cleaner now!

      Thanks for your typing tips here, I had learn this by testing your answers and codes (In fact, most of my programming skills are learned through studying your code, and I am truly grateful to you)

      Last๏ผŒ thanks or your times during the meeting time!

      Cheers~
      DunHou

    • DunhouD

      How can we get the default port of a GraphNode?

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      7
      0
      Votes
      7
      Posts
      1.6k
      Views

      DunhouD

      Hey @m_adam ,

      Can we port this DataDescriptionDatabaseInterface in python in some up-coming versions? this would be handy for some converting progress, now if I want to convert data, I have to manually writhe to node id, it is worth an automatic solution and we already have this.

      Cheers~
      DunHou

    • DunhouD

      Can we handle drag document from treeview?

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      3
      0
      Votes
      3
      Posts
      566
      Views

      DunhouD

      Hi @i_mazlov ,

      Sadly the GenerateDragData() not work in python, I had try the c4d.DRAGTYPE_FILENAME_SCENE, but it will return bad without GenerateDragData(),seems nothing we can do here.

      Cheers~
      DunHou

    • DunhouD

      How can I get the Inexclude date changed when drag or use straw?

      Cinema 4D SDK
      • windows python 2024 • • Dunhou
      3
      0
      Votes
      3
      Posts
      568
      Views

      DunhouD

      Thanks @i_mazlov ,

      The msg[c4d.BFM_ACTION_VALUE] is all I want, Thanks for that.

      Cheers~
      DunHou

    • DunhouD

      UserArea drag and drop example?

      Cinema 4D SDK
      • windows 2024 python • • Dunhou
      6
      0
      Votes
      6
      Posts
      1.4k
      Views

      K

      I tried using a timer to solve this problem, but I still want to know if there is a more direct way

      import c4d import threading from c4d.gui import GeUserArea, GeDialog GADGET_ID_GEUSERAREA = 10000 class DropArea(GeUserArea): def __init__(self): # Used to store all objects involved in the drag-and-drop operation self.currentDragObjects = [] # Flag to indicate whether a drag operation is in progress self.isDragging = False # Define a timer to delay the handling of the drag completion self.dragTimer = None def Message(self, msg, result): # Handle drag-and-drop messages if msg.GetId() == c4d.BFM_DRAGRECEIVE: # Check if the drag was lost or canceled if msg.GetInt32(c4d.BFM_DRAG_LOST) or msg.GetInt32(c4d.BFM_DRAG_ESC): self.isDragging = False return self.SetDragDestination(c4d.MOUSE_FORBIDDEN) # If the drag just started, clear the previous object list if not self.isDragging: self.currentDragObjects = [] # Initialize the storage list self.isDragging = True # Mark the beginning of the drag # Verify if it is a valid drop area if not self.CheckDropArea(msg, True, True): return self.SetDragDestination(c4d.MOUSE_FORBIDDEN) # Get the dragged file object dragInfo = self.GetDragObject(msg) if dragInfo is not None: dragObject = dragInfo['object'] # Check if the object already exists in the list to avoid duplicates if dragObject not in self.currentDragObjects: self.currentDragObjects.append(dragObject) # Reset the timer to delay the handling of drag completion if self.dragTimer is not None: self.dragTimer.cancel() # Set a short timer (e.g., 0.2 seconds) to determine if the drag operation is complete self.dragTimer = threading.Timer(0.2, self._finalize_drag) self.dragTimer.start() # Set the mouse cursor to a valid state return self.SetDragDestination(c4d.MOUSE_MOVE) # Call the base class Message() method to handle other messages return c4d.gui.GeUserArea.Message(self, msg, result) def _finalize_drag(self): # Delayed execution to ensure all dragged objects have been received self.isDragging = False if self.currentDragObjects: # Print all dropped files print(f"Dropped files: {self.currentDragObjects}") # Additional logic can be executed here, e.g., handling file paths or other content # Clear the object list for the next drag-and-drop operation self.currentDragObjects = [] # Redraw the user area (if UI update is needed) self.Redraw() class ExampleDialog(GeDialog): geUserArea = DropArea() def CreateLayout(self): self.SetTitle("Drag Area") if self.GroupBegin(0, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, cols=1, rows=0, title="", groupflags=0, initw=100, inith=100): self.GroupBorderSpace(8, 8, 8, 8) self.GroupSpace(2, 2) # Add the user area gadget self.AddUserArea(GADGET_ID_GEUSERAREA, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, 200, 200) # Attach the user area to the gadget self.AttachUserArea(self.geUserArea, GADGET_ID_GEUSERAREA) self.GroupEnd() return True if __name__ == "__main__": global dlg dlg = ExampleDialog() dlg.Open(dlgtype=c4d.DLG_TYPE_ASYNC, defaultw=200, defaulth=200)
    • DunhouD

      GraphModelHelper.IsConnected(node, port) crash in 2024.

      Cinema 4D SDK
      • 2024 python windows • • Dunhou
      2
      0
      Votes
      2
      Posts
      436
      Views

      M

      Hi thanks for the report, python should never crash, so it's going to be fixed in the next release. In any case the port should be a valid a port, but an exception should be raised when None is passed.

      Cheers,
      Maxime