[Bf-blender-cvs] [f3bd5da7fc3] blender2.8: UI: button to create new collection in the Outliner

Pablo Vazquez noreply at git.blender.org
Thu Jun 21 00:38:08 CEST 2018


Commit: f3bd5da7fc333b6ff768c90830783f6ade1a2d7d
Author: Pablo Vazquez
Date:   Thu Jun 21 00:37:57 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBf3bd5da7fc333b6ff768c90830783f6ade1a2d7d

UI: button to create new collection in the Outliner

Expose search like in 2.7, we could make it pop on Ctrl+F to save space if needed.
Align Filter and the less used View menu to the right.

Based on mockups and feedback session with William

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

M	release/scripts/startup/bl_ui/space_outliner.py

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

diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index f825546bb47..dea28d809c8 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -35,7 +35,16 @@ class OUTLINER_HT_header(Header):
         row = layout.row(align=True)
         row.template_header()
 
-        layout.prop(space, "display_mode", text="")
+        layout.prop(space, "display_mode", icon_only=True)
+
+        if display_mode in {'VIEW_LAYER'}:
+            layout.operator("outliner.collection_new", text="", icon="ZOOMIN").nested = True
+
+        layout.separator_spacer()
+
+        layout.prop(space, "filter_text", icon="VIEWZOOM", text="")
+
+        layout.separator_spacer()
 
         row = layout.row(align=True)
         if display_mode in {'VIEW_LAYER'}:
@@ -50,8 +59,6 @@ class OUTLINER_HT_header(Header):
             sub.active = space.use_filter_id_type
             sub.prop(space, "filter_id_type", text="", icon_only=True)
 
-        OUTLINER_MT_editor_menus.draw_collapsible(context, layout)
-
         if space.display_mode == 'DATA_API':
             layout.separator()
 
@@ -70,12 +77,7 @@ class OUTLINER_HT_header(Header):
                 row = layout.row()
                 row.label(text="No Keying Set Active")
 
-        row = layout.row(align=True)
-        row.prop(space, "use_filter_search", text="")
-        if space.use_filter_search:
-            row.prop(space, "filter_text", text="")
-            row.prop(space, "use_filter_complete", text="")
-            row.prop(space, "use_filter_case_sensitive", text="")
+        OUTLINER_MT_editor_menus.draw_collapsible(context, layout)
 
 
 class OUTLINER_MT_editor_menus(Menu):
@@ -106,12 +108,19 @@ class OUTLINER_MT_view(Menu):
 
         space = context.space_data
 
+        layout.prop(space, "use_filter_complete", text="Exact Match Search")
+        layout.prop(space, "use_filter_case_sensitive", text="Case Sensitive Search")
+
+        layout.separator()
+
         if space.display_mode != 'DATA_API':
             layout.prop(space, "use_sort_alpha")
             layout.prop(space, "show_restrict_columns")
             layout.separator()
             layout.operator("outliner.show_active")
 
+        layout.separator()
+
         layout.operator("outliner.show_one_level", text="Show One Level")
         layout.operator("outliner.show_one_level", text="Hide One Level").open = False
         layout.operator("outliner.show_hierarchy")



More information about the Bf-blender-cvs mailing list