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

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

    Cinema 4D SDK
    windows 2024 python
    2
    3
    592
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • kangddanK
      kangddan
      last edited by

      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'
      

      https://github.com/kangddan

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @kangddan
        last edited by ferdinand

        Hey @kangddan,

        Thank you for reaching out to us. The module attribute is NBIT_AHIDE_FOR_HOST. The line there in the docs might have been written when we still exposed symbols manually (and were a little bit inconsistent - these days symbols are exposed automatically) or always has been incorrect. But our documentation is still managed manually, something I probably should change, but that will also cost time.

        When unsure, you can always search {c4d}\resource\modules\python\libs\python311\c4d\__init__.py, as this is where all the c4d symbols are defined. Or you just search {c4d}\resource\modules\python\libs\python311\ and with that the whole API. Last but not least, symbols are always just that - symbols - and you can also just use the raw value directly lifted from the C++ API frameworks (when something has not correctly been exposed for some reason). That would have been 95 in this case:

        7b00fa89-e28d-4284-a4cb-67ee072f9d82-image.png

        I have updated the Python docs for this member of NBIT to be named as c4d.NBIT_AHIDE_FOR_HOST.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        kangddanK 1 Reply Last reply Reply Quote 1
        • kangddanK
          kangddan @ferdinand
          last edited by

          @ferdinand Thansk!

          https://github.com/kangddan

          1 Reply Last reply Reply Quote 0
          • First post
            Last post