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>2017-12-29 18:32:23 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-12-29 18:38:28 +0300
commitbbbdb27d658d7bad950376d12edee126c59f3628 (patch)
treed649331d28102c66a45f0d04ba511341095789ab /release
parent4d08ef822ce291744d40e0fef47975e7f61826e8 (diff)
Outliner/Collection: Interface for Master Collection Tree
This is part of T53495. This adds an Edit menu and remove the buttons.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py23
1 files changed, 18 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index dbd436b72c3..043ca19ba11 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -60,14 +60,13 @@ class OUTLINER_HT_header(Header):
elif space.display_mode == 'ORPHAN_DATA':
layout.operator("outliner.orphans_purge")
- elif space.display_mode in {'ACT_LAYER', 'MASTER_COLLECTION'}:
+ elif space.display_mode == 'ACT_LAYER':
row = layout.row(align=True)
row.operator("outliner.collection_new", text="", icon='NEW')
- if space.display_mode == 'ACT_LAYER':
- row.operator("outliner.collection_override_new", text="", icon='LINK_AREA')
- row.operator("outliner.collection_link", text="", icon='LINKED')
- row.operator("outliner.collection_unlink", text="", icon='UNLINKED')
+ row.operator("outliner.collection_override_new", text="", icon='LINK_AREA')
+ row.operator("outliner.collection_link", text="", icon='LINKED')
+ row.operator("outliner.collection_unlink", text="", icon='UNLINKED')
row.operator("outliner.collections_delete", text="", icon='X')
@@ -88,6 +87,9 @@ class OUTLINER_MT_editor_menus(Menu):
if space.display_mode == 'DATABLOCKS':
layout.menu("OUTLINER_MT_edit_datablocks")
+ elif space.display_mode == 'MASTER_COLLECTION':
+ layout.menu("OUTLINER_MT_edit_collections")
+
class OUTLINER_MT_view(Menu):
bl_label = "View"
@@ -127,6 +129,16 @@ class OUTLINER_MT_search(Menu):
layout.prop(space, "use_filter_complete")
+class OUTLINER_MT_edit_collections(Menu):
+ bl_label = "Edit"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("outliner.collection_nested_new", text="New Collection", icon='NEW')
+ layout.operator("outliner.collection_delete_selected", text="Delete Collections", icon='X')
+
+
class OUTLINER_MT_edit_datablocks(Menu):
bl_label = "Edit"
@@ -147,6 +159,7 @@ classes = (
OUTLINER_MT_editor_menus,
OUTLINER_MT_view,
OUTLINER_MT_search,
+ OUTLINER_MT_edit_collections,
OUTLINER_MT_edit_datablocks,
)