diff options
author | Julian Eisel <julian@blender.org> | 2022-03-31 13:09:56 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-03-31 13:21:14 +0300 |
commit | 0c6dc7c59ebd8d7857e8c078e37e285769fb5770 (patch) | |
tree | 4309b5d7018dd0fb6a4fd844844fa966921cad53 /release/scripts/startup/bl_ui/space_outliner.py | |
parent | 2202259e9c1f704496c66a19c15d4174d6c9a3f0 (diff) |
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
Diffstat (limited to 'release/scripts/startup/bl_ui/space_outliner.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_outliner.py | 10 |
1 files changed, 8 insertions, 2 deletions
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') |