Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2018-11-30 07:24:06 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-02-06 00:32:58 +0300
commit897e047374fa3d3ceef35aa2cdb3372b6a7cc64a (patch)
tree5554fb11f9bf40f55d78c88e7443a5b6b4999dae /release
parente3f7f0c3ebd3c1aa546fa212c3d67d050fab2e41 (diff)
Outliner visibility unification: Implement 3 levels of viewport visibility
Now collection and objects can be either: * Disabled for all the view layers. * Hidden for a view layer but not necessarily for all others. * Visible for a view layer but not necessarily for all others. Regarding icons: Whatever we decide to use for the "Hidden for all view layers" needs to be a toggle-like icon. Because when viewing "Scenes" instead of "View Layer" in the outliner we should be able to edit the collection "Hidden for all the view layers" as an on/off option. The operators are accessible via a Visibility context menu or shortcuts: * Ctrl + Click: Isolate collection (use shift to extend). * Alt + Click: Disable collection. * Shift + Click: Hide/Show collection and its children (objects and collections) Things yet to be tackled: * Object outliner context menu can also get a Visibility sub-menu. * Get better icons for viewport enable/disable. Note: * When using emulate 3 button mouse alt+click is used for 2d panning. In this case users have to use the operator from the menu. See T57857 for discussion. Patch: https://developer.blender.org/D4011 Reviewers: brecht and sergey Thanks to the reviewers and William Reynish and Julien Kasper in particular for the feedback.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 4ab990c451b..59fd4701748 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -148,6 +148,29 @@ class OUTLINER_MT_collection_view_layer(Menu):
layout.operator("outliner.collection_holdout_clear")
+class OUTLINER_MT_collection_visibility(Menu):
+ bl_label = "Visibility"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("outliner.collection_isolate", text="Isolate")
+ layout.operator("outliner.collection_show", text="Show")
+ layout.operator("outliner.collection_hide", text="Hide")
+
+ layout.separator()
+ layout.operator("outliner.collection_show_inside", text="Show All Inside")
+ layout.operator("outliner.collection_hide_inside", text="Hide All Inside")
+
+ layout.separator()
+ layout.operator("outliner.collection_enable", text="Enable in Viewports")
+ layout.operator("outliner.collection_disable", text="Disable in Viewports")
+
+ layout.separator()
+ layout.operator("outliner.collection_enable_render", text="Enable in Render")
+ layout.operator("outliner.collection_disable_render", text="Disable in Render")
+
+
class OUTLINER_MT_collection(Menu):
bl_label = "Collection"
@@ -178,6 +201,9 @@ class OUTLINER_MT_collection(Menu):
layout.menu("OUTLINER_MT_collection_view_layer")
layout.separator()
+ layout.menu("OUTLINER_MT_collection_visibility")
+
+ layout.separator()
layout.operator_menu_enum("outliner.id_operation", "type", text="ID Data")
layout.separator()
@@ -301,6 +327,7 @@ classes = (
OUTLINER_MT_edit_datablocks,
OUTLINER_MT_collection,
OUTLINER_MT_collection_new,
+ OUTLINER_MT_collection_visibility,
OUTLINER_MT_collection_view_layer,
OUTLINER_MT_object,
OUTLINER_MT_context,