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>2020-04-16 17:19:44 +0300
committerBastien Montagne <bastien@blender.org>2020-04-16 17:21:11 +0300
commit81bb2a143c5e9cb5885717b7f1dca84fdba41c0b (patch)
tree05e24cdaf595788d7bb32f71ced61c2dbe01b73b /source/blender/makesrna
parentdac609120785ad26a3ba56cb32019226c0f9762d (diff)
Fix T75730: Properly remove unused override properties/operations.
While code is supposed to handle gracefully invalid override operations, it is much cleaner to avoid those completely.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 32b375fda97..fbd86d78472 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -677,7 +677,9 @@ bool RNA_struct_override_matches(Main *bmain,
// printf("Override Checking %s\n", rna_path);
- if (ignore_overridden && BKE_lib_override_library_property_find(override, rna_path) != NULL) {
+ IDOverrideLibraryProperty *op = BKE_lib_override_library_property_find(override, rna_path);
+ if (ignore_overridden && op != NULL) {
+ BKE_lib_override_library_operations_tag(op, IDOVERRIDE_LIBRARY_TAG_UNUSED, false);
RNA_PATH_FREE;
continue;
}
@@ -716,9 +718,13 @@ bool RNA_struct_override_matches(Main *bmain,
if (diff != 0) {
/* XXX TODO: refine this for per-item overriding of arrays... */
- IDOverrideLibraryProperty *op = BKE_lib_override_library_property_find(override, rna_path);
+ op = BKE_lib_override_library_property_find(override, rna_path);
IDOverrideLibraryPropertyOperation *opop = op ? op->operations.first : NULL;
+ if (op != NULL) {
+ BKE_lib_override_library_operations_tag(op, IDOVERRIDE_LIBRARY_TAG_UNUSED, false);
+ }
+
if (do_restore && (report_flags & RNA_OVERRIDE_MATCH_RESULT_CREATED) == 0) {
/* We are allowed to restore to reference's values. */
if (ELEM(NULL, op, opop) || opop->operation == IDOVERRIDE_LIBRARY_OP_NOOP) {