Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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. kangddan
    • Profile
    • Following 1
    • Followers 3
    • Topics 8
    • Posts 24
    • Best 2
    • Controversial 0
    • Groups 0

    kangddan

    @kangddan

    2
    Reputation
    25
    Profile views
    24
    Posts
    3
    Followers
    1
    Following
    Joined Last Online

    kangddan Unfollow Follow

    Best posts made by kangddan

    • RE: How to Undo Switching Between Modes?

      @ferdinand Thank you for letting me know that switching between modes is irreversible! My initial thought was that when I generate an empty object in edit mode, if I undo the action, I could return to edit mode. Thanks again for your explanation 🙂

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • RE: How to call other object's button attribute by a tag and simulate clicking?

      Hi @ferdinand
      Thanks for your help! Apologies for not providing code earlier, and also for the confusion with the PySide GIF – it was just an analogy to explain the batch triggering concept I was trying to achieve in C4D.
      
      I'm happy to report that I've successfully resolved the issue with the global signal for user data buttons. Your guidance on the message system was very useful~
      
      Cheers
      DanDanKang
      bandicam 2025-05-23 19-37-11-991 00_00_00-00_00_30.gif

      posted in Cinema 4D SDK
      kangddanK
      kangddan

    Latest posts made by kangddan

    • RE: ChangeNBit() Method Parameter Issue: c4d.AHIDE_FOR_HOST Not Recognized?

      @ferdinand Thansk!

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • ChangeNBit() Method Parameter Issue: c4d.AHIDE_FOR_HOST Not Recognized?

      I've identified an apparent invalid parameter error with GeListNode.ChangeNBit() in C4D 2024. Specifically, c4d.AHIDE_FOR_HOST throws an AttributeError, conflicting with its presence in the R20+ SDK documentation. Any insights on why this parameter isn't recognized?

      import c4d
      
      doc.StartUndo()
      doc.AddUndo(c4d.UNDOTYPE_CHANGE, op)
      
      op.ChangeNBit(c4d.AHIDE_FOR_HOST, c4d.NBITCONTROL_SET) # error
      
      doc.EndUndo()
      c4d.EventAdd()
      

      error

      Traceback (most recent call last):
        File "scriptmanager", line 6, in <module>
      AttributeError: module 'c4d' has no attribute 'AHIDE_FOR_HOST'
      
      posted in Cinema 4D SDK windows 2024 python
      kangddanK
      kangddan
    • RE: How to call other object's button attribute by a tag and simulate clicking?

      Hi @ferdinand
      Thanks for your help! Apologies for not providing code earlier, and also for the confusion with the PySide GIF – it was just an analogy to explain the batch triggering concept I was trying to achieve in C4D.
      
      I'm happy to report that I've successfully resolved the issue with the global signal for user data buttons. Your guidance on the message system was very useful~
      
      Cheers
      DanDanKang
      bandicam 2025-05-23 19-37-11-991 00_00_00-00_00_30.gif

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • RE: How to call other object's button attribute by a tag and simulate clicking?

      @ferdinand
      giff.gif
      Just like this, I can manually click each object's user data button to make it do its work. Then I also have a button that can trigger the content inside each object's Python tag in a batch~

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • RE: How to call other object's button attribute by a tag and simulate clicking?

      Thanks @ferdinand
      I've found that c4d.CallButton doesn't seem to simulate clicks on buttons created via custom user data. Or, when I click a user data button, can it send a global signal? I don't quite understand the Message function of the Python tag. If I can send a global signal, then the Message functions inside all objects with Python tags could receive the signal, allowing for unified batch triggering. This seems more elegant than simulating clicks on buttons of different objects to trigger them.

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • How to call other object's button attribute by a tag and simulate clicking?

      Hello everyone, I want to simulate clicking buttons on other objects through a custom button. Is this possible?
      Thank you!c981a2679efc788cb33ee5312fb5f3a.png

      posted in Cinema 4D SDK 2024 windows python
      kangddanK
      kangddan
    • RE: Frozen Matrix different

      @i_mazlov said in Frozen Matrix different:

      象,并且没有其

      I found that it's very similar to the offsetParentMatrix attribute introduced in Maya 2020.:)

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • RE: How to Undo Switching Between Modes?

      @ferdinand My English isn't very good, sorry😣 about that. What I mean is that when I am in edit mode and select points/edges/polygons, create a null object, and then switch back to object mode, if I want to undo, it would be more 'user-friendly' if I could return to the previous edit mode instead of object mode
      It's good to know that calling doc.SetMode(c4d.Mmodel) is non-undoable; I struggled with this for a while😬

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • RE: How to Undo Switching Between Modes?

      @ferdinand Thank you for letting me know that switching between modes is irreversible! My initial thought was that when I generate an empty object in edit mode, if I undo the action, I could return to edit mode. Thanks again for your explanation 🙂

      posted in Cinema 4D SDK
      kangddanK
      kangddan
    • How to Undo Switching Between Modes?

      Hello all, my script needs to work in point, edge, and polygon modes (edit modes). At the end of the script, I will switch it back to model mode, but I'm not sure how to undo the mode switching. When I run the code in point mode, I can't return to point mode when undoing

      import c4d
      
      def main():
          sel = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_CHILDREN)
          if not sel or not doc.IsEditMode(): return # edit mode
      
          doc.StartUndo()
          for obj in sel:
              doc.SetSelection(obj, c4d.SELECTION_SUB)
              joint = c4d.BaseObject(c4d.Ojoint)
              doc.AddUndo( c4d.UNDOTYPE_NEWOBJ, joint)
              doc.InsertObject(joint, None, obj, True)
              doc.SetSelection(joint, c4d.SELECTION_ADD)
              ...
      
          doc.SetMode(c4d.Mmodel) # set model mode
          doc.EndUndo()
          c4d.EventAdd()
      
      if __name__ == '__main__':
          main()
      
      posted in Cinema 4D SDK windows 2024 python
      kangddanK
      kangddan