Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_panel.c
| Show First 20 Lines • Show All 932 Lines • ▼ Show 20 Lines | |||||
| * Set the flag telling every panel to override its expansion with its search result status. | * Set the flag telling every panel to override its expansion with its search result status. | ||||
| */ | */ | ||||
| static void region_panels_set_expansion_from_seach_filter(const bContext *C, | static void region_panels_set_expansion_from_seach_filter(const bContext *C, | ||||
| ARegion *region, | ARegion *region, | ||||
| const bool use_search_closed, | const bool use_search_closed, | ||||
| const bool use_animation) | const bool use_animation) | ||||
| { | { | ||||
| LISTBASE_FOREACH (Panel *, panel, ®ion->panels) { | LISTBASE_FOREACH (Panel *, panel, ®ion->panels) { | ||||
| /* Checking if the panel is active is only an optimization, it would be fine to run this on | |||||
| * inactive panels. */ | |||||
| if (panel->runtime_flag & PANEL_ACTIVE) { | |||||
| panel_set_expansion_from_seach_filter_recursive(C, panel, use_search_closed, use_animation); | panel_set_expansion_from_seach_filter_recursive(C, panel, use_search_closed, use_animation); | ||||
| } | } | ||||
| } | |||||
| set_panels_list_data_expand_flag(C, region); | set_panels_list_data_expand_flag(C, region); | ||||
| } | } | ||||
| /** | /** | ||||
| * Hide buttons in invisible layouts, which are created because in order to search, | * Hide buttons in invisible layouts, which are created because in order to search, | ||||
| * buttons must be added for all panels, even panels that will end up closed. | * buttons must be added for all panels, even panels that will end up closed. | ||||
| */ | */ | ||||
| static void panel_remove_invisible_layouts_recursive(Panel *panel, const Panel *parent_panel) | static void panel_remove_invisible_layouts_recursive(Panel *panel, const Panel *parent_panel) | ||||
| ▲ Show 20 Lines • Show All 1,755 Lines • Show Last 20 Lines | |||||