diff options
author | Bastien Montagne <bastien@blender.org> | 2020-08-17 17:42:28 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-08-17 17:44:36 +0300 |
commit | c7a7a38b653a3587302a000355159784decee4a6 (patch) | |
tree | f788db75a9d71fb9d6c43975413e932b8f4857b5 /source/blender/makesrna/intern/rna_access_compare_override.c | |
parent | 8010cbe620d2b6bc9aac9fe4793cce672459a7f0 (diff) |
Fix T79633: ovrride apply code broken with RNA-defined runtime IDProps in some cases.
When copying between a set RNA runtime property and an unset one, code
would not behave properly.
We have to also consider NULL 'override apply' callback pointer as a
valid 'use default override apply function' case.
Diffstat (limited to 'source/blender/makesrna/intern/rna_access_compare_override.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_access_compare_override.c | 4 |
1 files changed, 2 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 0a739dcfc5a..ac4553349cc 100644 --- a/source/blender/makesrna/intern/rna_access_compare_override.c +++ b/source/blender/makesrna/intern/rna_access_compare_override.c @@ -484,13 +484,13 @@ static bool rna_property_override_operation_apply(Main *bmain, /* Special case for IDProps, we use default callback then. */ if (prop_dst->magic != RNA_MAGIC) { override_apply = rna_property_override_apply_default; - if (prop_src->magic == RNA_MAGIC && prop_src->override_apply != override_apply) { + if (prop_src->magic == RNA_MAGIC && !ELEM(prop_src->override_apply, NULL, override_apply)) { override_apply = NULL; } } else if (prop_src->magic != RNA_MAGIC) { override_apply = rna_property_override_apply_default; - if (prop_dst->override_apply != override_apply) { + if (!ELEM(prop_dst->override_apply, NULL, override_apply)) { override_apply = NULL; } } |