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 546 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 01/01/2018 at 08:11, xxxxxxxx wrote:

      is it possible to alter already existed description?
      I have an object generator plugin that has 2 attributes. Slider and CheckBox.
      Currently, I'm only ghosting the slider by using CheckBox But I want to completely hide it.

      TESTPLUGIN_ID = 1000001 #Temporary ID
      TESTPLUGIN_VALUE = 10000 #Real Slider
      TESTPLUGIN_BOOL = 10001 #Bool CheckBox
        
      class Testplugin(c4d.plugins.ObjectData) :
        
          def Init(self, node) :
              self.InitAttr(node, float, TESTPLUGIN_VALUE)
              node[TESTPLUGIN_VALUE] = 0
        
              self.InitAttr(node, bool, TESTPLUGIN_BOOL)
              node[TESTPLUGIN_BOOL] = True
              return True
        
          def GetDEnabling(self, node, id, t_data, flags, itemdesc) :
              if id[0].id == TESTPLUGIN_VALUE: return bool(node[c4d.TESTPLUGIN_BOOL])
              return True
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 01/01/2018 at 11:57, xxxxxxxx wrote:

        You will need to use the DESC_HIDE in GetDDescription(), gr4ph0s already provided a link to such discussion:
        https://developers.maxon.net/forum/topic/9824/13229_hide-descelements-r18
        Have a look at the last post in above discussion

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

          On 01/01/2018 at 19:57, xxxxxxxx wrote:

          Sorry, I somehow missed this answer by gr4ph0s
          It helped. 

          I'll upload this plugin here.
          https://www.dropbox.com/s/ryq9r41qnvnbpnt/Test Plugin1.zip?dl=0

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