Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2019-08-10 17:34:24 +0300
committerAntonioya <blendergit@gmail.com>2019-08-10 17:50:21 +0300
commit049c50e095d88ce73de19057c52dcd62387559ff (patch)
treef8b92ef4d08662ce5d7d9445eaddd1ac98231598 /source/blender/editors/gpencil
parent9e68b560a60a1059fdcea5c9bfe19db724df083b (diff)
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
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c7
1 files changed, 7 insertions, 0 deletions
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? */