diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-17 06:37:20 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-17 06:37:20 +0300 |
commit | 1d88aeb95fc40771be7ef3a835af4206c845aa9b (patch) | |
tree | ac7108df46d7dcc7b6cebd206b0e3448f774f456 /source/blender/editors/metaball | |
parent | ea0c86e961de20d4215824d5cfd239a1f4c4cc90 (diff) |
View 3D: support for select passthrough when picking selected items
Currently this isn't used in the key-map, it will eventually
allow the 3D viewports tweak tool to match the behavior of other
editors that support tweaking a selection without first de-selecting
all other elements.
Diffstat (limited to 'source/blender/editors/metaball')
-rw-r--r-- | source/blender/editors/metaball/mball_edit.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c index 55cae268e75..06a649e5b6c 100644 --- a/source/blender/editors/metaball/mball_edit.c +++ b/source/blender/editors/metaball/mball_edit.c @@ -854,9 +854,14 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], const struct SelectPic bool found = ed_mball_findnearest_metaelem(C, mval, true, &base, &ml, &selmask); - if ((params->sel_op == SEL_OP_SET) && (found || params->deselect_all)) { - /* Deselect everything. */ - changed |= ED_mball_deselect_all_multi(C); + if (params->sel_op == SEL_OP_SET) { + if ((found && params->select_passthrough) && (ml->flag & SELECT)) { + found = false; + } + else if (found || params->deselect_all) { + /* Deselect everything. */ + changed |= ED_mball_deselect_all_multi(C); + } } if (found) { |