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

    Disable CUSTOMGUI_BITMAPBUTTON hover fx [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 635 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 13/03/2017 at 10:36, xxxxxxxx wrote:

      I am using a c4d.CUSTOMGUI_BITMAPBUTTON with a transparent png. Does anyone know of a way to not have the background lighten up when hovering it?

      def CreateLayout(self) :
      	path = os.path.join(os.path.dirname(__file__), "res", "icons", "icon.png")
      	icon = c4d.BaseContainer()
        
      	icon.SetLong(c4d.BITMAPBUTTON_BORDER, c4d.BORDER_NONE)
      	icon.SetLong(c4d.BITMAPBUTTON_OUTBORDER, c4d.BORDER_NONE)
      	icon.SetBool(c4d.BITMAPBUTTON_BUTTON, True)
      	icon.SetBool(c4d.BITMAPBUTTON_TOGGLE, False)
      	icon.SetBool(c4d.BITMAPBUTTON_NOBORDERDRAW, True)
      	icon.SetLong(c4d.BITMAPBUTTON_BACKCOLOR, c4d.COLOR_BG)
        
      	self.GroupBegin(GRP_BUTTON_GROUP, c4d.BFH_LEFT | c4d.BFV_TOP, cols=1)
      	area = self.AddCustomGui(GRP_ICON, c4d.CUSTOMGUI_BITMAPBUTTON, "icon", c4d.BFH_RIGHT | c4d.BFV_CENTER, 18, 18, icon)
      	area.SetImage(path, False, False)
      	self.GroupEnd()
        
      	return True
      

      this all works fine, i get the button but i get a stupid box when i mouse over it.

      Thanks!

      -- edit: changed post title to reflect solved.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 13/03/2017 at 13:37, xxxxxxxx wrote:

        COLOR_BG appears to be internally hard coded to animate like that.
        Using any of the other colors defined in the SDK should make that behavior stop.

        icon.SetLong(c4d.BITMAPBUTTON_BACKCOLOR, c4d.COLOR_BG_TEXTUREVIEW)
        

        -ScottA

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 14/03/2017 at 05:42, xxxxxxxx wrote:

          Yep, Scott is right. This got discussed before for a NodeData parameter description: Button options.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 14/03/2017 at 07:40, xxxxxxxx wrote:

            thanks guys! That works. Using the value Scott put makes the bg the same gray as when it was hovered over though. Im looking through the coffeesymbols.h file now to try and find one that is transparent/clear or whatever. I don't seem to be able to set a custom color. This gets me in the right direction though.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 14/03/2017 at 07:43, xxxxxxxx wrote:

              got it. c4d.COLOR_BGEDIT was the answer.

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