forked from bartvdbraak/blender
Outliner: Get rid of Search Menu
Use inline options instead. This will be collapsable once we merge the upcoming filter sytem.
This commit is contained in:
parent
9398db07cc
commit
51bcf7bd5f
@ -38,11 +38,16 @@ class OUTLINER_HT_header(Header):
|
||||
|
||||
layout.prop(space, "display_mode", text="")
|
||||
|
||||
layout.prop(space, "filter_text", icon='VIEWZOOM', text="")
|
||||
row = layout.row(align=True)
|
||||
row.prop(space, "filter_text", icon='VIEWZOOM', text="")
|
||||
row.prop(space, "use_filter_complete", text="")
|
||||
row.prop(space, "use_filter_case_sensitive", text="")
|
||||
|
||||
layout.separator()
|
||||
if space.display_mode not in {'DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS', 'ACT_LAYER', 'COLLECTIONS'}:
|
||||
row.prop(space, "use_sort_alpha", text="")
|
||||
|
||||
if space.display_mode == 'DATABLOCKS':
|
||||
elif space.display_mode == 'DATABLOCKS':
|
||||
layout.separator()
|
||||
row = layout.row(align=True)
|
||||
row.operator("outliner.keyingset_add_selected", icon='ZOOMIN', text="")
|
||||
row.operator("outliner.keyingset_remove_selected", icon='ZOOMOUT', text="")
|
||||
@ -71,7 +76,6 @@ class OUTLINER_MT_editor_menus(Menu):
|
||||
space = context.space_data
|
||||
|
||||
layout.menu("OUTLINER_MT_view")
|
||||
layout.menu("OUTLINER_MT_search")
|
||||
|
||||
if space.display_mode == 'DATABLOCKS':
|
||||
layout.menu("OUTLINER_MT_edit_datablocks")
|
||||
@ -92,8 +96,6 @@ class OUTLINER_MT_view(Menu):
|
||||
space = context.space_data
|
||||
|
||||
if space.display_mode not in {'DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS'}:
|
||||
if space.display_mode not in {'ACT_LAYER', 'COLLECTIONS'}:
|
||||
layout.prop(space, "use_sort_alpha")
|
||||
layout.prop(space, "show_restrict_columns")
|
||||
layout.separator()
|
||||
layout.operator("outliner.show_active")
|
||||
@ -109,18 +111,6 @@ class OUTLINER_MT_view(Menu):
|
||||
layout.operator("screen.screen_full_area", text="Toggle Fullscreen Area").use_hide_panels = True
|
||||
|
||||
|
||||
class OUTLINER_MT_search(Menu):
|
||||
bl_label = "Search"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
space = context.space_data
|
||||
|
||||
layout.prop(space, "use_filter_case_sensitive")
|
||||
layout.prop(space, "use_filter_complete")
|
||||
|
||||
|
||||
class OUTLINER_MT_edit_active_view_layer(Menu):
|
||||
bl_label = "Edit"
|
||||
|
||||
@ -170,7 +160,6 @@ classes = (
|
||||
OUTLINER_HT_header,
|
||||
OUTLINER_MT_editor_menus,
|
||||
OUTLINER_MT_view,
|
||||
OUTLINER_MT_search,
|
||||
OUTLINER_MT_edit_active_view_layer,
|
||||
OUTLINER_MT_edit_datablocks,
|
||||
OUTLINER_MT_edit_orphan_data,
|
||||
|
@ -2140,16 +2140,19 @@ static void rna_def_space_outliner(BlenderRNA *brna)
|
||||
prop = RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_CASE_SENSITIVE);
|
||||
RNA_def_property_ui_text(prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string");
|
||||
RNA_def_property_ui_icon(prop, ICON_SYNTAX_OFF, 0);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE);
|
||||
RNA_def_property_ui_text(prop, "Complete Matches Only", "Only use complete matches of search string");
|
||||
RNA_def_property_ui_icon(prop, ICON_OUTLINER_DATA_FONT, 0);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_sort_alpha", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SO_SKIP_SORT_ALPHA);
|
||||
RNA_def_property_ui_text(prop, "Sort Alphabetically", "");
|
||||
RNA_def_property_ui_icon(prop, ICON_SORTALPHA, 0);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "show_restrict_columns", PROP_BOOLEAN, PROP_NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user