[Bf-blender-cvs] [049c50e095d] master: GPencil: Disable Select operator for Sculpt mode if Mask is OFF

Antonio Vazquez noreply at git.blender.org
Sat Aug 10 17:04:38 CEST 2019


Commit: 049c50e095d88ce73de19057c52dcd62387559ff
Author: Antonio Vazquez
Date:   Sat Aug 10 16:34:24 2019 +0200
Branches: master
https://developer.blender.org/rB049c50e095d88ce73de19057c52dcd62387559ff

GPencil: Disable Select operator for Sculpt mode if Mask is OFF

The selection is only valid when the mask is enabled, so the operators must be disabled.

This modification is part of D5452

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 5a962809954..b09b91c6fc9 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -71,6 +71,13 @@ static bool gpencil_select_poll(bContext *C)
 {
   bGPdata *gpd = ED_gpencil_data_get_active(C);
 
+  if (GPENCIL_SCULPT_MODE(gpd)) {
+    ToolSettings *ts = CTX_data_tool_settings(C);
+    if ((ts->gp_sculpt.flag & GP_SCULPT_SETT_FLAG_SELECT_MASK) == 0) {
+      return false;
+    }
+  }
+
   /* we just need some visible strokes, and to be in editmode or other modes only to catch event */
   if (GPENCIL_ANY_MODE(gpd)) {
     /* TODO: include a check for visible strokes? */



More information about the Bf-blender-cvs mailing list