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

    Hide attributes

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 447 Views
    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.
    • H Offline
      Helper
      last edited by

      On 22/12/2017 at 02:38, xxxxxxxx wrote:

      Hello plugincafe!
      I need to hide X-Ray checkbox of Generator Plugin.

      The only way that I found is 'ghosting' and it works without any problems.

      #Ghosting X-Ray Attribute
          def GetDEnabling(self, node, id, t_data, flags, itemdesc) :
              if id[0].id == c4d.ID_BASEOBJECT_XRAY:  return False
      

      But I want to completely hide it from attributes manager.

      I tried to do this from description file but I'm not getting desired results.

        1. CONTAINER Otestplugin
        2. {
        3.     NAME Otestplugin;
        4.     INCLUDE Obase;
        5.      **HIDE ID_BASEOBJECT_XRAY;**
        6.     	//Groups & Settings
      
      

      Is there a way to do this directly from pyp file or from description file?

      Cheers! 🙂

      -Merk

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 22/12/2017 at 03:13, xxxxxxxx wrote:

        You can retrieve the description and hide it.
        I'm on my phone so I don't have an exemple but few links that may help you.

        https://developers.maxon.net/docs/py/2023_2/modules/c4d/Description/index.html
        http://creativetuts.com/hide-or-show-userdata-via-python-script/
        https://developers.maxon.net/forum/topic/160/13229_hide-descelements-r18

        I'm pretty sure you can have the basecontainer from GetDEnabling

        Hope its help.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 22/12/2017 at 06:40, xxxxxxxx wrote:

          Hi,

          Note it's not recommended to change an object's description from GetDEnabling() as it is generated again afterwards in the next call to GetDDescription().
          GetDEnabling() should only be used to provide the enabled state of the given parameter.
          GetDDescription() is the function where an object's description is defined and can be altered.

          Unfortunately, it seems ID_BASEOBJECT_XRAY hidden state is always set to false for generators.
          This needs some further investigation to see if there's a way to circumvent such behavior.

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