From 0c6dc7c59ebd8d7857e8c078e37e285769fb5770 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 31 Mar 2022 12:09:56 +0200 Subject: Outliner: New "Hierarchies" view mode for Library Overrides Adds a dropdown for the Library Overrides display mode that lets users choose between a "Properties" and a "Hierachies" view mode. The former is what was previously there (a mode that displays all overridden properties with buttons to edit the values), the latter is new. It displays the hierarchical relationships between library overridden data-blocks. E.g. to override the mesh of an object inside a linked collection, the entire collection > object > mesh hierarchy needs to be overridden (whereby the former two will be automatically overridden using system overrides). The Hierarchies mode will also show the override hierarchies of data-blocks that were linked and are overridden in the source file. This information is useful to have, especially for debugging scenes. Part of T95802. Differential Revision: https://developer.blender.org/D14440 Reviewed by: Bastien Montagne --- release/scripts/startup/bl_ui/space_outliner.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui') diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 0f3dc1f8794..eff8ad8e8b3 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -22,6 +22,8 @@ class OUTLINER_HT_header(Header): if display_mode == 'DATA_API': OUTLINER_MT_editor_menus.draw_collapsible(context, layout) + if display_mode == 'LIBRARY_OVERRIDES': + layout.prop(space, "lib_override_view_mode", text="") layout.separator_spacer() @@ -41,7 +43,11 @@ class OUTLINER_HT_header(Header): text="", icon='FILTER', ) - if display_mode in {'LIBRARIES', 'LIBRARY_OVERRIDES', 'ORPHAN_DATA'}: + if display_mode == 'LIBRARY_OVERRIDES' and space.lib_override_view_mode == 'HIERARCHIES': + # Don't add ID type filter for library overrides hierarchies mode. Point of it is to see a hierarchy that is + # usually constructed out of different ID types. + pass + elif display_mode in {'LIBRARIES', 'LIBRARY_OVERRIDES', 'ORPHAN_DATA'}: row.prop(space, "use_filter_id_type", text="", icon='FILTER') sub = row.row(align=True) sub.active = space.use_filter_id_type @@ -364,7 +370,7 @@ class OUTLINER_PT_filter(Panel): col.prop(space, "use_filter_complete", text="Exact Match") col.prop(space, "use_filter_case_sensitive", text="Case Sensitive") - if display_mode == 'LIBRARY_OVERRIDES' and bpy.data.libraries: + if display_mode == 'LIBRARY_OVERRIDES' and space.lib_override_view_mode == 'PROPERTIES' and bpy.data.libraries: col.separator() row = col.row() row.label(icon='LIBRARY_DATA_OVERRIDE') -- cgit v1.2.3