[Bf-blender-cvs] [6fb06d0cd8f] blender2.8: Fix border select operations in object mode
Campbell Barton
noreply at git.blender.org
Wed Aug 15 14:57:51 CEST 2018
Commit: 6fb06d0cd8f3d076514d8a6b78415bcff07fa26a
Author: Campbell Barton
Date: Wed Aug 15 22:17:03 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB6fb06d0cd8f3d076514d8a6b78415bcff07fa26a
Fix border select operations in object mode
===================================================================
M source/blender/editors/space_view3d/view3d_select.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 3ed98362467..f91876a01bd 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2328,14 +2328,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, c
if (BASE_SELECTABLE(base)) {
if ((base->object->select_color & 0x0000FFFF) != 0) {
BLI_array_append(bases, base);
- }
- else {
- const bool is_select = base->flag & BASE_SELECTED;
- const bool is_inside = false; /* we know there are no hits. */
- const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside);
- if (sel_op_result != -1) {
- ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT);
- }
+ base->object->id.tag &= ~LIB_TAG_DOIT;
}
}
}
@@ -2368,11 +2361,14 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, c
changed = true;
}
else if (!bone_only) {
- const bool is_select = base->flag & BASE_SELECTED;
- const bool is_inside = true;
- const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside);
- if (sel_op_result != -1) {
- ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT);
+ if ((base->object->id.tag & LIB_TAG_DOIT) == 0) {
+ base->object->id.tag |= LIB_TAG_DOIT;
+ const bool is_select = base->flag & BASE_SELECTED;
+ const bool is_inside = true;
+ const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside);
+ if (sel_op_result != -1) {
+ ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT);
+ }
}
}
@@ -2410,6 +2406,20 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, c
}
}
+ if (SEL_OP_USE_OUTSIDE(sel_op)) {
+ for (int i = 0; i < BLI_array_len(bases); i++) {
+ Base *base = bases[i];
+ if ((base->object->flag & OB_DONE) == 0) {
+ const bool is_select = base->flag & BASE_SELECTED;
+ const bool is_inside = false; /* we know there are no hits. */
+ const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside);
+ if (sel_op_result != -1) {
+ ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT);
+ }
+ }
+ }
+ }
+
MEM_freeN(bases);
DEG_id_tag_update(&vc->scene->id, DEG_TAG_SELECT_UPDATE);
More information about the Bf-blender-cvs
mailing list