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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-11-26 18:21:55 +0300
committerJeroen Bakker <jeroen@blender.org>2020-12-02 10:34:19 +0300
commit50e8072708428a169f7049a2626c2392b7c4e202 (patch)
tree146ab657e30fa90adcfd4174978998e351a1ad33 /source
parentd56111383a9907ebde9f5b05ce7c6e91dde4ebf0 (diff)
Fix T83055: setting rna pointer properties can create bogus custom properties
This was reported in the form of the eyedropper of the 'Parent' property creating a custom property 'parent' if self was picked. Problem arises when certain checks for setting rna pointer properties failed (for example: the PROP_ID_SELF_CHECK check) and then a different code path was entered (which was only meant for IDProperties). Problem was introduced in rBa7b3047cefcb. To solve, now first enter the branch for rna-based pointer properties, then perform the sanity-checks (and if these fail: dont enter the other unrelated codepath but instead do nothing) Maniphest Tasks: T83055 Differential Revision: https://developer.blender.org/D9652
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_access.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index b56a18c18a9..317d3ede855 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -3822,9 +3822,11 @@ void RNA_property_pointer_set(PointerRNA *ptr,
}
}
/* RNA property. */
- else if (pprop->set && !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
- !((prop->flag & PROP_ID_SELF_CHECK) && ptr->owner_id == ptr_value.owner_id)) {
- pprop->set(ptr, ptr_value, reports);
+ else if (pprop->set) {
+ if (!((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
+ !((prop->flag & PROP_ID_SELF_CHECK) && ptr->owner_id == ptr_value.owner_id)) {
+ pprop->set(ptr, ptr_value, reports);
+ }
}
/* IDProperty desguised as RNA property (and not yet defined in ptr). */
else if (prop->flag & PROP_EDITABLE) {