Return Buttons to False State

  • 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

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


    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

Log in to reply