Disable CUSTOMGUI_BITMAPBUTTON hover fx [SOLVED]



  • 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.



  • 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



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

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



  • 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.



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

    got it. c4d.COLOR_BGEDIT was the answer.


Log in to reply