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

    Getting the value of a gadget

    Cinema 4D SDK
    2
    3
    373
    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.
    • R
      rui_mac
      last edited by

      I have a CommandDataPlugin that creates a dialog with buttons and a checkbox.
      It is easy to get what gadget what clicked, inside the Command method.
      But how to I get the value of the checkbox?
      I need to know if it is on or off, and Command only tells me what gadget was clicked.

      1 Reply Last reply Reply Quote 0
      • CairynC
        Cairyn
        last edited by

        You can just ask the control for its value:

            def Command(self, id, msg):
                if id==ID_FILE:
                    self.chkFile = self.GetBool(ID_FILE)
        

        (if ID_FILE is the dialog's ID for a checkbox)

        1 Reply Last reply Reply Quote 0
        • R
          rui_mac
          last edited by

          Thank you so much. That did it!!

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