diff options
author | Julian Eisel <julian@blender.org> | 2021-07-30 20:37:11 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-07-30 20:41:19 +0300 |
commit | 96fb21f3af103db67bf9ea984b01485654c5e89c (patch) | |
tree | ad13c145ac3cb680616194b88c5b5bf6e92520a2 /release | |
parent | a9ea310d30d63f735dbdc106a4515c6ae4bf7893 (diff) |
UI: Move Mark/Clear asset out of ID Data in Outliner context menu
They are now always shown in the top-level of the Outliner context menu.
Having them in the ID Data submenu was just a hassle to work with, and
often confusing to users - even if technically correct (the asset status
is part of the ID data).
Part of T82680.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_outliner.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index ba91b6e8d50..0a4f419362d 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -105,6 +105,10 @@ class OUTLINER_MT_context_menu(Menu): @staticmethod def draw_common_operators(layout): + layout.menu_contents("OUTLINER_MT_asset") + + layout.separator() + layout.menu("OUTLINER_MT_context_menu_view") layout.separator() @@ -306,6 +310,22 @@ class OUTLINER_MT_object(Menu): OUTLINER_MT_context_menu.draw_common_operators(layout) +class OUTLINER_MT_asset(Menu): + bl_label = "Assets" + + @classmethod + def poll(cls, context): + return context.preferences.experimental.use_asset_browser + + def draw(self, context): + layout = self.layout + + space = context.space_data + + layout.operator("asset.mark") + layout.operator("asset.clear") + + class OUTLINER_PT_filter(Panel): bl_space_type = 'OUTLINER' bl_region_type = 'HEADER' @@ -451,6 +471,7 @@ classes = ( OUTLINER_MT_collection_visibility, OUTLINER_MT_collection_view_layer, OUTLINER_MT_object, + OUTLINER_MT_asset, OUTLINER_MT_context_menu, OUTLINER_MT_context_menu_view, OUTLINER_PT_filter, |