[Bf-blender-cvs] [f9cca128869] master: Fix T74596: Gpencil invert button was not working for Sculpt brushes

Antonio Vazquez noreply at git.blender.org
Tue Mar 10 20:12:27 CET 2020


Commit: f9cca128869fc07da46c095ac7dce16467121092
Author: Antonio Vazquez
Date:   Tue Mar 10 20:12:11 2020 +0100
Branches: master
https://developer.blender.org/rBf9cca128869fc07da46c095ac7dce16467121092

Fix T74596: Gpencil invert button was not working for Sculpt brushes

The button was not checked, only the pen position or the control key.

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

M	source/blender/editors/gpencil/gpencil_sculpt_paint.c

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

diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index adc009efd16..33b08d90751 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -231,8 +231,8 @@ static GP_Sculpt_Settings *gpsculpt_get_settings(Scene *scene)
 static bool gp_brush_invert_check(tGP_BrushEditData *gso)
 {
   /* The basic setting is the brush's setting (from the panel) */
-  bool invert = ((gso->brush->gpencil_settings->sculpt_flag & GP_SCULPT_FLAG_INVERT) != 0);
-
+  bool invert = ((gso->brush->gpencil_settings->sculpt_flag & GP_SCULPT_FLAG_INVERT) != 0) ||
+                (gso->brush->gpencil_settings->sculpt_flag & BRUSH_DIR_IN);
   /* During runtime, the user can hold down the Ctrl key to invert the basic behavior */
   if (gso->flag & GP_SCULPT_FLAG_INVERT) {
     invert ^= true;



More information about the Bf-blender-cvs mailing list