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:22:08 +0300
committerBastien Montagne <bastien@blender.org>2020-04-16 17:22:08 +0300
commite22e766cf82315adfbef6687c29b809ac24994c6 (patch)
treea0fa0690c7995918fc0508f94fe9ab60a40d7913 /source/blender/makesrna
parentd34c5eec19ad828237cff0916cc23240d0c25aa1 (diff)
parent81bb2a143c5e9cb5885717b7f1dca84fdba41c0b (diff)
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_access_compare_override.c33
-rw-r--r--source/blender/makesrna/intern/rna_object.c5
2 files changed, 16 insertions, 22 deletions
diff --git a/source/blender/makesrna/intern/rna_access_compare_override.c b/source/blender/makesrna/intern/rna_access_compare_override.c
index 199d22ee3dc..fbd86d78472 100644
--- a/source/blender/makesrna/intern/rna_access_compare_override.c
+++ b/source/blender/makesrna/intern/rna_access_compare_override.c
@@ -481,28 +481,13 @@ static bool rna_property_override_operation_apply(Main *bmain,
const short override_op = opop->operation;
- if (override_op == IDOVERRIDE_LIBRARY_OP_NOOP) {
- return true;
- }
-
- if (ELEM(override_op,
- IDOVERRIDE_LIBRARY_OP_ADD,
- IDOVERRIDE_LIBRARY_OP_SUBTRACT,
- IDOVERRIDE_LIBRARY_OP_MULTIPLY) &&
- !ptr_storage) {
- /* We cannot apply 'diff' override operations without some reference storage.
- * This should typically only happen at read time of .blend file... */
+ if (!BKE_lib_override_library_property_operation_operands_validate(
+ opop, ptr_dst, ptr_src, ptr_storage, prop_dst, prop_src, prop_storage)) {
return false;
}
- if (ELEM(override_op,
- IDOVERRIDE_LIBRARY_OP_ADD,
- IDOVERRIDE_LIBRARY_OP_SUBTRACT,
- IDOVERRIDE_LIBRARY_OP_MULTIPLY) &&
- !prop_storage) {
- /* We cannot apply 'diff' override operations without some reference storage.
- * This should typically only happen at read time of .blend file... */
- return false;
+ if (override_op == IDOVERRIDE_LIBRARY_OP_NOOP) {
+ return true;
}
RNAPropOverrideApply override_apply = NULL;
@@ -692,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;
}
@@ -731,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) {
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index cb8dffe3168..b81a175a94b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1625,7 +1625,10 @@ bool rna_Object_modifiers_override_apply(Main *bmain,
}
mod_src = mod_src ? mod_src->next : ob_src->modifiers.first;
- BLI_assert(mod_src != NULL);
+ if (mod_src == NULL) {
+ BLI_assert(mod_src != NULL);
+ return false;
+ }
/* While it would be nicer to use lower-level modifier_new() here, this one is lacking
* special-cases handling (particles and other physics modifiers mostly), so using the ED version