Commit: fc3cf89a69039ae3a1f0e60ffcacbeb299cf5ec1
Author: Antonio Vazquez
Date:   Fri Nov 22 10:32:27 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBfc3cf89a69039ae3a1f0e60ffcacbeb299cf5ec1

GPencil: Allow to hide cursor in Sculpt/Weight and Vertex mode

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_utils.c 
b/source/blender/editors/gpencil/gpencil_utils.c
index 69926eabdc8..0dbaeef98bd 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1738,6 +1738,10 @@ static void gp_brush_cursor_draw(bContext *C, int x, int 
y, void *customdata)
     if ((brush == NULL) || (brush->gpencil_settings == NULL)) {
       return;
     }
+    if ((brush->gpencil_settings->flag & GP_BRUSH_ENABLE_CURSOR) == 0) {
+      return;
+    }
+
     radius = brush->size;
     if (brush->gpencil_settings->sculpt_flag &
         (GP_SCULPT_FLAG_INVERT | GP_SCULPT_FLAG_TMP_INVERT)) {
@@ -1754,6 +1758,10 @@ static void gp_brush_cursor_draw(bContext *C, int x, int 
y, void *customdata)
     if ((brush == NULL) || (brush->gpencil_settings == NULL)) {
       return;
     }
+    if ((brush->gpencil_settings->flag & GP_BRUSH_ENABLE_CURSOR) == 0) {
+      return;
+    }
+
     radius = brush->size;
     if (brush->gpencil_settings->sculpt_flag &
         (GP_SCULPT_FLAG_INVERT | GP_SCULPT_FLAG_TMP_INVERT)) {
@@ -1770,6 +1778,10 @@ static void gp_brush_cursor_draw(bContext *C, int x, int 
y, void *customdata)
     if ((brush == NULL) || (brush->gpencil_settings == NULL)) {
       return;
     }
+    if ((brush->gpencil_settings->flag & GP_BRUSH_ENABLE_CURSOR) == 0) {
+      return;
+    }
+
     radius = brush->size;
     copy_v3_v3(color, brush->rgb);
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to