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

    Return Buttons to False State

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 227 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 30/05/2014 at 23:17, xxxxxxxx wrote:

      Hi everyone. I have created a Button with this code:

      import c4d

      def main() :
         
          
         User_Cntrl = doc.SearchObject("User_Test")

      if (len(User_Cntrl.GetUserDataContainer()) == 0) :
             
             
             bc = c4d.GetCustomDatatypeDefault(c4d.DTYPE_BOOL)     #Create the Control
             bc.SetLong(c4d.DESC_CUSTOMGUI,c4d.CUSTOMGUI_BUTTON)   #Change the BOOL to a Button       
             bc.SetString(c4d.DESC_NAME,"Click Me")                #Put Text on the Button
             
                           
             Choose = User_Cntrl.AddUserData(bc)                   #Add the Control to the object
             User_Cntrl[Choose] = False                            #Asign a default value to Control
             
             c4d.EventAdd()

      I then duplicated it in the "Manage UserData" and renamed them.

      Btn_01
      Btn_02
      Btn_03
      Btn_04

      I want when I press the one Button that the other 3 Buttons be "False or value of 1"

      Btn_01   Btn_01
      Btn_02   Btn_02
      Btn_03   Btn_03
      Btn_04   Btn_04

      Please need some help

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