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
    • Recent
    • Tags
    • Users
    • Login

    Plugins.ObjectData EnableGadget [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 708 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 09/12/2014 at 10:41, xxxxxxxx wrote:

      Hi 🙂

      Enable Gadget work in ObjectData? How?

      Thanks!!!

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

        On 09/12/2014 at 12:53, xxxxxxxx wrote:

        Hi,

        like:

          
          def GetDEnabling(self, node, id, t_data, flags, itemdesc) :  
                
              if id[0].id == 10001:  
                  return False  
                
              return True  
        

        or

          
          def GetDEnabling(self, node, id, t_data, flags, itemdesc) :  
                
              if id[0].id == 10001:  
                  return node[10002] == 0  
              else:  
                  return c4d.plugins.NodeData.GetDEnabling(self, node, id, t_data, flags, itemdesc)  
        

        10001 a vectorfield gadget e.g
        10002 a cheeckbox

        Best wishes
        Martin

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

          On 09/12/2014 at 13:43, xxxxxxxx wrote:

          Thanks!!!! 😄

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

            On 09/12/2014 at 14:20, xxxxxxxx wrote:

            and if I wanted to hide or unhide a gadget?

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

              On 10/12/2014 at 02:58, xxxxxxxx wrote:

              Hello,

              to dynamically hide or show parameters or parameter groups you would have to edit the Description[URL-REMOVED] of the parameter. This is not implemented in the Python API (see here[URL-REMOVED]).

              best wishes,
              Sebastian


              [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

                On 10/12/2014 at 09:21, xxxxxxxx wrote:

                Thank you all!!!

                Last question:
                In UserData? EnableGadget work? how?

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

                  On 10/12/2014 at 10:15, xxxxxxxx wrote:

                  Pleas have a lock at this thread:

                  https://developers.maxon.net/forum/topic/6478/6965_deschide-and-desceditable&KW=hide+userdata

                  it´also

                  GetDEnabling()
                  

                  for ghosting

                  and [DESC_HIDE] for hiding

                  Best wishes
                  Martin

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