From 85f90ed6fd8858a60ea24dd82f73b88363207133 Mon Sep 17 00:00:00 2001 From: Antonioya Date: Sat, 17 Aug 2019 16:18:09 +0200 Subject: Fix T68723: GPencil - Split Select mode for Sculpt and Edit mode Actually, the selection mode is not visible in Sculpt mode when mask is enabled, but still is used. Also, the mode is shared between Edit mode and Sculpt mode and for meshes the selector is by mode. This commit splits the select mode in different properties and show the selector in Sculpt mode to define the Select mode. Also, the Select Mask button has been removed and now the Select Mode buttons work equal to Meshes where the select buttons are the mask enable too. Fixed some old code not valid detected during these changes. Differential Revision: https://developer.blender.org/D5500 --- source/blender/makesdna/DNA_scene_types.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'source/blender/makesdna/DNA_scene_types.h') diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index f50b345e402..45159af306c 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1125,7 +1125,7 @@ typedef struct GP_Sculpt_Settings { /* GP_Sculpt_Settings.flag */ typedef enum eGP_Sculpt_SettingsFlag { /* only affect selected points */ - GP_SCULPT_SETT_FLAG_SELECT_MASK = (1 << 0), + GP_SCULPT_SETT_FLAG_DEPRECATED = (1 << 0), /* apply brush to position */ GP_SCULPT_SETT_FLAG_APPLY_POSITION = (1 << 1), /* apply brush to strength */ @@ -1142,6 +1142,16 @@ typedef enum eGP_Sculpt_SettingsFlag { GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE = (1 << 7), } eGP_Sculpt_SettingsFlag; +/* GP_Sculpt_Settings.gpencil_selectmode_sculpt */ +typedef enum eGP_Sculpt_SelectMaskFlag { + /* only affect selected points */ + GP_SCULPT_MASK_SELECTMODE_POINT = (1 << 0), + /* only affect selected strokes */ + GP_SCULPT_MASK_SELECTMODE_STROKE = (1 << 1), + /* only affect selected segmenst */ + GP_SCULPT_MASK_SELECTMODE_SEGMENT = (1 << 2), +} eGP_Sculpt_SelectMaskFlag; + /* Settings for GP Interpolation Operators */ typedef struct GP_Interpolate_Settings { /** #eGP_Interpolate_SettingsFlag. */ @@ -1412,8 +1422,10 @@ typedef struct ToolSettings { /** Default stroke thickness for annotation strokes. */ short annotate_thickness; - /** Stroke selection mode. */ - short gpencil_selectmode; + /** Stroke selection mode for Edit. */ + char gpencil_selectmode_edit; + /** Stroke selection mode for Sculpt. */ + char gpencil_selectmode_sculpt; /* Grease Pencil Sculpt */ struct GP_Sculpt_Settings gp_sculpt; -- cgit v1.2.3