diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-08-14 03:28:41 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-08-14 18:48:55 +0300 |
commit | e88e80a6a0c8976ac2d245c274ca5a0388736743 (patch) | |
tree | 870bc13538dfb5b55d4063cdab0aa611573dde60 /source/blender/editors/sculpt_paint | |
parent | d92d310b158d4b946aa8b811248b25e7a39f7a1a (diff) |
3D View boarder/lasso select tool options
Add tool options to control how select operates (add/sub/set/and/xor).
Note: edit mode armature select still needs to support all options,
this is complicated by how it handles partial end-point selection.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_ops.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index aed48aef3a9..a09c04f6fb0 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -258,7 +258,7 @@ static void mask_box_select_task_cb( } BKE_pbvh_vertex_iter_end; } -int ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *rect, bool select, bool UNUSED(extend)) +int ED_sculpt_mask_box_select(struct bContext *C, ViewContext *vc, const rcti *rect, bool select) { Depsgraph *depsgraph = CTX_data_depsgraph(C); Sculpt *sd = vc->scene->toolsettings->sculpt; diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 86d36ade477..359c93175b4 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -48,6 +48,7 @@ #include "ED_paint.h" #include "ED_screen.h" +#include "ED_select_utils.h" #include "ED_image.h" #include "ED_gpencil.h" #include "UI_resources.h" @@ -1444,9 +1445,9 @@ void ED_keymap_paint(wmKeyConfig *keyconf) RNA_enum_set(kmi->ptr, "action", SEL_INVERT); WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", false); + RNA_enum_set(kmi->ptr, "mode", SEL_OP_ADD); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "deselect", true); + RNA_enum_set(kmi->ptr, "mode", SEL_OP_SUB); WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0); /* Image/Texture Paint mode */ |