Fix top bar unified color & image paint brush
authorCampbell Barton <ideasman42@gmail.com>
Wed, 24 Oct 2018 22:53:22 +0000 (09:53 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 24 Oct 2018 22:54:18 +0000 (09:54 +1100)
release/scripts/startup/bl_ui/space_topbar.py

index 9fdc7143d1147809c1e498eb3af5f00fa9b441c1..ccc96ed2ebb3cbdb3033a9d7ac098d4de5c4ac94 100644 (file)
@@ -229,13 +229,13 @@ class _draw_left_context_mode:
         def PAINT_TEXTURE(context, layout, tool):
             if (tool is None) or (not tool.has_datablock):
                 return
-            brush = context.tool_settings.vertex_paint.brush
+            brush = context.tool_settings.image_paint.brush
             if brush is None:
                 return
 
             from .properties_paint_common import UnifiedPaintPanel
 
-            layout.prop(brush, "color", text="")
+            UnifiedPaintPanel.prop_unified_color(layout, context, brush, "color", text="")
             UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
             UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
 
@@ -248,7 +248,7 @@ class _draw_left_context_mode:
 
             from .properties_paint_common import UnifiedPaintPanel
 
-            layout.prop(brush, "color", text="")
+            UnifiedPaintPanel.prop_unified_color(layout, context, brush, "color", text="")
             UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
             UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")