Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_select.c
| Show First 20 Lines • Show All 1,246 Lines • ▼ Show 20 Lines | void outliner_item_select(SpaceOutliner *soops, | ||||
| tselem->flag = new_flag; | tselem->flag = new_flag; | ||||
| } | } | ||||
| static bool do_outliner_range_select_recursive(ListBase *lb, | static bool do_outliner_range_select_recursive(ListBase *lb, | ||||
| TreeElement *active, | TreeElement *active, | ||||
| TreeElement *cursor, | TreeElement *cursor, | ||||
| bool selecting) | bool selecting) | ||||
| { | { | ||||
| for (TreeElement *te = lb->first; te; te = te->next) { | LISTBASE_FOREACH (TreeElement *, te, lb) { | ||||
| TreeStoreElem *tselem = TREESTORE(te); | TreeStoreElem *tselem = TREESTORE(te); | ||||
| if (selecting) { | if (selecting) { | ||||
| tselem->flag |= TSE_SELECTED; | tselem->flag |= TSE_SELECTED; | ||||
| } | } | ||||
| /* Set state for selection */ | /* Set state for selection */ | ||||
| if (te == active || te == cursor) { | if (te == active || te == cursor) { | ||||
| ▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | static int outliner_box_select_exec(bContext *C, wmOperator *op) | ||||
| const bool select = (sel_op != SEL_OP_SUB); | const bool select = (sel_op != SEL_OP_SUB); | ||||
| if (SEL_OP_USE_PRE_DESELECT(sel_op)) { | if (SEL_OP_USE_PRE_DESELECT(sel_op)) { | ||||
| outliner_flag_set(&soops->tree, TSE_SELECTED, 0); | outliner_flag_set(&soops->tree, TSE_SELECTED, 0); | ||||
| } | } | ||||
| WM_operator_properties_border_to_rctf(op, &rectf); | WM_operator_properties_border_to_rctf(op, &rectf); | ||||
| UI_view2d_region_to_view_rctf(®ion->v2d, &rectf, &rectf); | UI_view2d_region_to_view_rctf(®ion->v2d, &rectf, &rectf); | ||||
| for (TreeElement *te = soops->tree.first; te; te = te->next) { | LISTBASE_FOREACH (TreeElement *, te, &soops->tree) { | ||||
| outliner_item_box_select(soops, scene, &rectf, te, select); | outliner_item_box_select(soops, scene, &rectf, te, select); | ||||
| } | } | ||||
| DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); | DEG_id_tag_update(&scene->id, ID_RECALC_SELECT); | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); | WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); | ||||
| ED_region_tag_redraw(region); | ED_region_tag_redraw(region); | ||||
| if (soops->flag & SO_SYNC_SELECT) { | if (soops->flag & SO_SYNC_SELECT) { | ||||
| ▲ Show 20 Lines • Show All 271 Lines • Show Last 20 Lines | |||||