diff options
author | Julian Eisel <julian@blender.org> | 2022-08-04 16:52:51 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-04 16:57:08 +0300 |
commit | 67b92418ee7e8519d20c35a685676b41ca3e5c37 (patch) | |
tree | 16f02a7bd1f0126f1ca8e335152f76b44c76e029 /source/blender/makesrna/intern | |
parent | 79955e5f85c2b05ae7f191af987b2ff743e764fc (diff) |
Outliner: Use UI names and grouping for library overrides properties
Part of T95802.
Showing properties with an RNA path in the UI isn't very user friendly.
Instead, represent the RNA path as a tree, merging together parts of the
RNA path that are shared by multiple properties. Properties and "groups"
(RNA structs/pointers) are now shown with their UI name and an icon if
any. The actually overridden properties still show the Library Overrides
icon. See the patch for screenshots.
Also: When a RNA collection item, like a modifier or constraint was
added via a library override, indicate that item and show all collection
items in the list, since the complete list of items and their orders may
be important context.
Differential Revision: https://developer.blender.org/D15606
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_path.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_path.cc b/source/blender/makesrna/intern/rna_path.cc index 22bd607b027..5d570657b53 100644 --- a/source/blender/makesrna/intern/rna_path.cc +++ b/source/blender/makesrna/intern/rna_path.cc @@ -602,7 +602,8 @@ char *RNA_path_append(const char *path, BLI_dynstr_append(dynstr, RNA_property_identifier(prop)); - if (RNA_property_type(prop) == PROP_COLLECTION) { + const bool has_key = (intkey > -1) || (strkey != nullptr); + if (has_key && (RNA_property_type(prop) == PROP_COLLECTION)) { /* add ["strkey"] or [intkey] */ BLI_dynstr_append(dynstr, "["); |