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.
This commit is contained in:
2022-03-17 14:37:20 +11:00
parent ea0c86e961
commit 1d88aeb95f
11 changed files with 231 additions and 152 deletions

View File

@@ -1879,10 +1879,16 @@ bool PE_mouse_particles(bContext *C, const int mval[2], const struct SelectPick_
PTCacheEditKey *key;
bool changed = false;
const bool found = pe_nearest_point_and_key(C, mval, &point, &key);
bool found = pe_nearest_point_and_key(C, mval, &point, &key);
if ((params->sel_op == SEL_OP_SET) && (found || params->deselect_all)) {
changed |= PE_deselect_all_visible_ex(edit);
if (params->sel_op == SEL_OP_SET) {
if ((found && params->select_passthrough) && (key->flag & PEK_SELECT)) {
found = false;
}
else if (found || params->deselect_all) {
/* Deselect everything. */
changed |= PE_deselect_all_visible_ex(edit);
}
}
if (found) {