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

    Get toggle state of c4d.CUSTOMGUI_BITMAPBUTTON

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 143 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 15/09/2014 at 02:34, xxxxxxxx wrote:

      I have defined a CustomGui - CUSTOMGUI_BITMAPBUTTON to toggle between 2 images.
      It works great, clicking on the icon will toggle between two images.

      The question is now, how can I read to the customgui container (below bbcH) to get the current state of the toggle, or get the information on which image is set?
      At this moment I'm using a variable to keep track of the toggle state, but getting it from the container or somewhere else makes more sense to me?

              bbcH = c4d.BaseContainer()                             
              bbcH.SetBool(c4d.BITMAPBUTTON_BUTTON, True)
              bbcH.SetBool(c4d.BITMAPBUTTON_TOGGLE, True)
              bbcH.SetLong(c4d.BITMAPBUTTON_ICONID1, imageIDHOff)          #Off state:         H
              bbcH.SetLong(c4d.BITMAPBUTTON_ICONID2, imageIDH)             #On State:          H
              bbcH.SetString(c4d.BITMAPBUTTON_TOOLTIP, "Rotation.H")
              self.buttonH = self.AddCustomGui(MYBUTTONH, c4d.CUSTOMGUI_BITMAPBUTTON, "", c4d.BFH_LEFT, 0, 0, bbcH)
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post