Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_select.c
| Show First 20 Lines • Show All 2,547 Lines • ▼ Show 20 Lines | static int do_object_box_select(bContext *C, ViewContext *vc, rcti *rect, const eSelectOp sel_op) | ||||
| } | } | ||||
| /* The draw order doesn't always match the order we populate the engine, see: T51695. */ | /* The draw order doesn't always match the order we populate the engine, see: T51695. */ | ||||
| qsort(vbuffer, hits, sizeof(uint[4]), opengl_bone_select_buffer_cmp); | qsort(vbuffer, hits, sizeof(uint[4]), opengl_bone_select_buffer_cmp); | ||||
| for (const uint *col = vbuffer + 3, *col_end = col + (hits * 4); col < col_end; col += 4) { | for (const uint *col = vbuffer + 3, *col_end = col + (hits * 4); col < col_end; col += 4) { | ||||
| Bone *bone; | Bone *bone; | ||||
| Base *base = ED_armature_base_and_bone_from_select_buffer(bases, BLI_array_len(bases), *col, &bone); | Base *base = ED_armature_base_and_bone_from_select_buffer(bases, BLI_array_len(bases), *col, &bone); | ||||
| if (base != NULL) { | |||||
| base->object->id.tag |= LIB_TAG_DOIT; | base->object->id.tag |= LIB_TAG_DOIT; | ||||
| } | } | ||||
| } | |||||
| for (Base *base = vc->view_layer->object_bases.first; base && hits; base = base->next) { | for (Base *base = vc->view_layer->object_bases.first; base && hits; base = base->next) { | ||||
| if (BASE_SELECTABLE(v3d, base)) { | if (BASE_SELECTABLE(v3d, base)) { | ||||
| const bool is_select = base->flag & BASE_SELECTED; | const bool is_select = base->flag & BASE_SELECTED; | ||||
| const bool is_inside = base->object->id.tag & LIB_TAG_DOIT; | const bool is_inside = base->object->id.tag & LIB_TAG_DOIT; | ||||
| const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); | const int sel_op_result = ED_select_op_action_deselected(sel_op, is_select, is_inside); | ||||
| if (sel_op_result != -1) { | if (sel_op_result != -1) { | ||||
| ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT); | ED_object_base_select(base, sel_op_result ? BA_SELECT : BA_DESELECT); | ||||
| ▲ Show 20 Lines • Show All 751 Lines • Show Last 20 Lines | |||||