[Bf-blender-cvs] [bd2c3a64185] greasepencil-object: GPencil: Add Add/Sub Brush color to Display Panel

Antonio Vazquez noreply at git.blender.org
Fri Nov 22 16:51:07 CET 2019


Commit: bd2c3a6418563804c13d19824cb1da4f054e3113
Author: Antonio Vazquez
Date:   Fri Nov 22 16:50:58 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBbd2c3a6418563804c13d19824cb1da4f054e3113

GPencil: Add Add/Sub Brush color to Display Panel

===================================================================

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index f75904cb618..eefc9695249 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -302,13 +302,24 @@ class GreasePencilAppearancePanel:
 
             layout.prop(gp_settings, "use_cursor", text="Show Brush")
 
-            if ob.mode == 'PAINT_GPENCIL': 
+            if ob.mode == 'PAINT_GPENCIL':
                 if brush.gpencil_tool == 'DRAW':
                     layout.prop(gp_settings, "show_lasso", text="Show Fill Color While Drawing")
 
                 if brush.gpencil_tool == 'FILL':
                     layout.prop(brush, "cursor_color_add", text="Color")
 
+            col = layout.column()
+            col.active = gp_settings.use_cursor
+
+            if ob.mode in {'SCULPT_GPENCIL', 'WEIGHT_GPENCIL', 'VERTEX_GPENCIL'}:
+                tool = brush.gpencil_tool
+                if tool in {'GRAB', 'CLONE'}:
+                    col.prop(brush, "cursor_color_add", text="Add")
+                else:
+                    col.prop(brush, "cursor_color_add", text="Add")
+                    col.prop(brush, "cursor_color_subtract", text="Subtract")
+
 
 class GreasePencilBrushFalloff:
     bl_label = "Falloff"



More information about the Bf-blender-cvs mailing list