Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_draw.c
| Show First 20 Lines • Show All 1,710 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void outliner_draw_highlights_recursive( | static void outliner_draw_highlights_recursive( | ||||
| unsigned pos, const ARegion *ar, const SpaceOops *soops, const ListBase *lb, | unsigned pos, const ARegion *ar, const SpaceOops *soops, const ListBase *lb, | ||||
| const float col_selection[4], const float col_highlight[4], const float col_searchmatch[4], | const float col_selection[4], const float col_highlight[4], const float col_searchmatch[4], | ||||
| int start_x, int *io_start_y) | int start_x, int *io_start_y) | ||||
| { | { | ||||
| const bool is_searching = SEARCHING_OUTLINER(soops) || | const bool is_searching = SEARCHING_OUTLINER(soops) || | ||||
| (soops->outlinevis == SO_DATABLOCKS && soops->search_string[0] != 0); | (soops->outlinevis == SO_DATABLOCKS && | ||||
| (soops->filter & SO_FILTER_SEARCH) && | |||||
| soops->search_string[0] != 0); | |||||
| for (TreeElement *te = lb->first; te; te = te->next) { | for (TreeElement *te = lb->first; te; te = te->next) { | ||||
| const TreeStoreElem *tselem = TREESTORE(te); | const TreeStoreElem *tselem = TREESTORE(te); | ||||
| const int start_y = *io_start_y; | const int start_y = *io_start_y; | ||||
| /* selection status */ | /* selection status */ | ||||
| if (tselem->flag & TSE_SELECTED) { | if (tselem->flag & TSE_SELECTED) { | ||||
| immUniformColor4fv(col_selection); | immUniformColor4fv(col_selection); | ||||
| ▲ Show 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | void draw_outliner(const bContext *C) | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| SpaceOops *soops = CTX_wm_space_outliner(C); | SpaceOops *soops = CTX_wm_space_outliner(C); | ||||
| uiBlock *block; | uiBlock *block; | ||||
| int sizey = 0, sizex = 0, sizex_rna = 0; | int sizey = 0, sizex = 0, sizex_rna = 0; | ||||
| TreeElement *te_edit = NULL; | TreeElement *te_edit = NULL; | ||||
| bool has_restrict_icons; | bool has_restrict_icons; | ||||
| outliner_build_tree(mainvar, scene, view_layer, soops); // always | outliner_build_tree(mainvar, scene, view_layer, soops, ar); // always | ||||
| /* get extents of data */ | /* get extents of data */ | ||||
| outliner_height(soops, &soops->tree, &sizey); | outliner_height(soops, &soops->tree, &sizey); | ||||
| if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) { | if (ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) { | ||||
| /* RNA has two columns: | /* RNA has two columns: | ||||
| * - column 1 is (max_width + OL_RNA_COL_SPACEX) or | * - column 1 is (max_width + OL_RNA_COL_SPACEX) or | ||||
| * (OL_RNA_COL_X), whichever is wider... | * (OL_RNA_COL_X), whichever is wider... | ||||
| ▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines | |||||