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
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2021-07-14 13:52:14 +0300
committerBastien Montagne <bastien@blender.org>2021-07-14 15:23:19 +0300
commit3de3c3c23a930943086ab9719f0abe5c069cc4b5 (patch)
tree7f24a5a03ee9c61e63e754d8c5b4a75d069c7cf3 /source/blender/makesrna
parentc9e9a422154581c5882b74e93c5be25798c88026 (diff)
Fix (unreported) LibOverride diffing generating operations for non-editable properties.
Non-pointer-like properties that are not editable should never generate override operations. While harmless (those would never be applied back anyway), better not clutter override operations list, and also enjoy the symbolic performances improvement here. NOTE: Pointer-like properties (pointers and collections) remain processed as usual here since they usually imply recursivity. We could make an exception to the exception for ID pointers, but for now I don't think this is worth it.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 816fc68195f..c4d35140423 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -422,7 +422,9 @@ static int rna_property_override_diff(Main *bmain,
bool override_changed = false;
eRNAOverrideMatch diff_flags = flags;
- if (!RNA_property_overridable_get(&prop_a->ptr, prop_a->rawprop)) {
+ if (!RNA_property_overridable_get(&prop_a->ptr, prop_a->rawprop) ||
+ (!ELEM(RNA_property_type(prop_a->rawprop), PROP_POINTER, PROP_COLLECTION) &&
+ !RNA_property_editable_flag(&prop_a->ptr, prop_a->rawprop))) {
diff_flags &= ~RNA_OVERRIDE_COMPARE_CREATE;
}
const int diff = override_diff(bmain,