Jump to content
Dear members and visitors, click here to subscribe for full access to community. This includes posting, plugin and asset downloads, free premium training courses and removal of Google ads. ×

robinnasif

Limited Member
  • Posts

    18
  • Joined

  • Last visited

Posts posted by robinnasif

  1. HI,

    i am stuck in this situation, need help. I don't know it is possible or not. How can i link this to buttons. I have created a user data button and i want to link it to a volume builder  cache button. please help me. 

     

    Thanks

    connectButtons.png

  2. Thanks a lot. i have already figure it out.

     

    import c4d
    from c4d import gui

     

    obj = op.GetObject()
    UD = obj.GetUserDataContainer()

    def main():

        mode = 1
        randomPoint = 2
        Field = 3


        for descId, container in UD:
            theID = descId[1].id
            if theID == randomPoint:


                if obj[c4d.ID_USERDATA, mode] == 0:
                    container[c4d.DESC_HIDE] = False
                    obj.SetUserDataContainer(descId, container)

                
                if obj[c4d.ID_USERDATA, mode] == 1:
                    container[c4d.DESC_HIDE] = True
                    obj.SetUserDataContainer(descId, container)

          
            if theID == Field:

          
                if obj[c4d.ID_USERDATA, mode] == 1:
                    container[c4d.DESC_HIDE] = False
                    obj.SetUserDataContainer(descId, container)

            
                if obj[c4d.ID_USERDATA, mode] == 0:
                    container[c4d.DESC_HIDE] = True
                    obj.SetUserDataContainer(descId, container)

×
×
  • Create New...