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 /source/blender/makesrna/intern/rna_space.c | |
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 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 3839b3ba6a4..e21c10166ab 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3593,6 +3593,21 @@ static void rna_def_space_outliner(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; + static const EnumPropertyItem lib_override_view_mode[] = { + {SO_LIB_OVERRIDE_VIEW_PROPERTIES, + "PROPERTIES", + ICON_NONE, + "Properties", + "Display all local override data-blocks with their overridden properties and buttons to " + "edit them"}, + {SO_LIB_OVERRIDE_VIEW_HIERARCHIES, + "HIERARCHIES", + ICON_NONE, + "Hierarchies", + "Display library override relationships"}, + {0, NULL, 0, NULL, NULL}, + }; + static const EnumPropertyItem filter_state_items[] = { {SO_FILTER_OB_ALL, "ALL", 0, "All", "Show all objects in the view layer"}, {SO_FILTER_OB_VISIBLE, "VISIBLE", 0, "Visible", "Show visible objects"}, @@ -3612,6 +3627,13 @@ static void rna_def_space_outliner(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); + prop = RNA_def_property(srna, "lib_override_view_mode", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, lib_override_view_mode); + RNA_def_property_ui_text(prop, + "Library Override View Mode", + "Choose different visualizations of library override data"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_OUTLINER, NULL); + prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "search_string"); RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string"); |