[Bf-blender-cvs] [51bcf7bd5f3] blender2.8: Outliner: Get rid of Search Menu

Dalai Felinto noreply at git.blender.org
Thu Jan 18 16:36:28 CET 2018


Commit: 51bcf7bd5f3f21e0ff38b04965cc8413c339b3cf
Author: Dalai Felinto
Date:   Thu Jan 18 13:20:10 2018 -0200
Branches: blender2.8
https://developer.blender.org/rB51bcf7bd5f3f21e0ff38b04965cc8413c339b3cf

Outliner: Get rid of Search Menu

Use inline options instead. This will be collapsable once we merge the upcoming
filter sytem.

===================================================================

M	release/scripts/startup/bl_ui/space_outliner.py
M	source/blender/makesrna/intern/rna_space.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 2f0406d6ee7..f231ab7d43c 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -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,
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index d28ebb5aadf..4190bb35a1e 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -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);



More information about the Bf-blender-cvs mailing list