Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-06-10 16:54:59 +0300
committerBastien Montagne <bastien@blender.org>2022-06-10 16:56:55 +0300
commit717ab5aeaecca72faaf9aeae4b469571cc8d4aee (patch)
tree12822c38c2d74dd6025fe8864c55a9eae4c7ee4c /source
parent4d0f7c3dcde22224b17e5c481fea11f99fe5b160 (diff)
LibOverride: Consider animated/driven properties as part of the 'system override' ones in the Outliner.
Conceptually animated/driven properties are not controlled by the liboverride system anymore, even though they may generate override operations. So consider them as part of the 'system overrides' category, and hide them by default in the Outliner.
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_outliner/tree/tree_element_overrides.cc27
1 files changed, 19 insertions, 8 deletions
diff --git a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
index 51ca2eff9ee..203ad18f85c 100644
--- a/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
+++ b/source/blender/editors/space_outliner/tree/tree_element_overrides.cc
@@ -71,18 +71,29 @@ void TreeElementOverridesBase::expand(SpaceOutliner &space_outliner) const
const bool is_rna_path_valid = BKE_lib_override_rna_property_find(
&idpoin, override_prop, &override_rna_ptr, &override_rna_prop, &rnaprop_index);
- if (is_rna_path_valid && !show_system_overrides &&
- ELEM(override_prop->rna_prop_type, PROP_POINTER, PROP_COLLECTION) &&
- RNA_struct_is_ID(RNA_property_pointer_type(&override_rna_ptr, override_rna_prop))) {
+ /* Check for conditions where the liboverride property should be considered as a system
+ * override, if needed. */
+ if (is_rna_path_valid && !show_system_overrides) {
bool do_continue = true;
- for (auto *override_prop_op :
- ListBaseWrapper<IDOverrideLibraryPropertyOperation>(override_prop->operations)) {
- if ((override_prop_op->flag & IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE) == 0) {
- do_continue = false;
- break;
+
+ /* Matching ID pointers are considered as system overrides. */
+ if (ELEM(override_prop->rna_prop_type, PROP_POINTER, PROP_COLLECTION) &&
+ RNA_struct_is_ID(RNA_property_pointer_type(&override_rna_ptr, override_rna_prop))) {
+ for (auto *override_prop_op :
+ ListBaseWrapper<IDOverrideLibraryPropertyOperation>(override_prop->operations)) {
+ if ((override_prop_op->flag & IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE) == 0) {
+ do_continue = false;
+ break;
+ }
}
}
+ /* Animated/driven properties are considered as system overrides. */
+ if (!BKE_lib_override_library_property_is_animated(
+ &id, override_prop, override_rna_prop, rnaprop_index)) {
+ do_continue = false;
+ }
+
if (do_continue) {
continue;
}