[Bf-blender-cvs] [5d7241a9ee1] master: UI: Move View operations to submenu in Outliner context menu

Pablo Vazquez noreply at git.blender.org
Fri Feb 8 12:52:28 CET 2019


Commit: 5d7241a9ee12e6105bd09f7e7f97345167038b4a
Author: Pablo Vazquez
Date:   Fri Feb 8 12:37:45 2019 +0100
Branches: master
https://developer.blender.org/rB5d7241a9ee12e6105bd09f7e7f97345167038b4a

UI: Move View operations to submenu in Outliner context menu

Show One Level, Hide One Level, Show Active, Show Hierarchy were taking
four items on the context menu when they are not accessed that often
from the context menu (they all have shortcuts).

The "View" name is used to match other editors View menus.

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

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 ee02171d762..33c68d50d56 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -103,17 +103,26 @@ class OUTLINER_MT_context(Menu):
     def draw(self, context):
         layout = self.layout
 
-        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")
+        layout.menu("OUTLINER_MT_context_view")
 
         layout.separator()
 
+        layout.menu("INFO_MT_area")
+
+
+class OUTLINER_MT_context_view(Menu):
+    bl_label = "View"
+
+    def draw(self, context):
+        layout = self.layout
+
         layout.operator("outliner.show_active")
 
         layout.separator()
 
-        layout.menu("INFO_MT_area")
+        layout.operator("outliner.show_hierarchy")
+        layout.operator("outliner.show_one_level", text="Show One Level")
+        layout.operator("outliner.show_one_level", text="Hide One Level").open = False
 
 
 class OUTLINER_MT_edit_datablocks(Menu):
@@ -341,6 +350,7 @@ classes = (
     OUTLINER_MT_collection_view_layer,
     OUTLINER_MT_object,
     OUTLINER_MT_context,
+    OUTLINER_MT_context_view,
     OUTLINER_PT_filter,
 )



More information about the Bf-blender-cvs mailing list