diff options
author | Julian Eisel <julian@blender.org> | 2022-08-04 16:52:51 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2022-08-04 17:14:01 +0300 |
commit | d2a30abff09b5403e72541860935c593602153b2 (patch) | |
tree | da295c64324d91cb214ffdd7b60be0cacb8a6862 /source/blender/makesrna | |
parent | 585dd63c6ef1d983558aac41e7e86a32a8649133 (diff) |
Outliner: Use UI names and grouping for library overrides properties
NOTE: This is committed to the 3.3 branch as decided by Bastien, Dalai
and me. That is because these are important usability fixes/improvements
to have for the LTS release.
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')
-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 3e0fc9add80..8d63dab3d8b 100644 --- a/source/blender/makesrna/intern/rna_path.cc +++ b/source/blender/makesrna/intern/rna_path.cc @@ -604,7 +604,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, "["); |