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-07-10 16:23:52 +0300
committerBastien Montagne <bastien@blender.org>2020-07-10 16:23:52 +0300
commitf93e0f1a9eefb162cf9432240b101a5d9c372910 (patch)
treed2dc213894c937241d1e72eff888964217a28b84 /source/blender/makesrna/intern/rna_access.c
parent337e2c902930d8a8980505d66234bc46c95b051c (diff)
Refactor override code to properly deal with runtime rna properties too.
The triplet static RNA / runtime RNA / custom properties is a real pain to deal with... Using the new `PropertyRNAOrID` struct helps clarifying and properly dealing with all three cases. Note that this makes override of py-defined RNA properties working (support for that will be committed next). Differential Revision: https://developer.blender.org/D8249
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index c3b417ca79d..8bf715f93c1 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -2145,9 +2145,7 @@ bool RNA_property_editable_info(PointerRNA *ptr, PropertyRNA *prop, const char *
return false;
}
if (ID_IS_OVERRIDE_LIBRARY(id)) {
- /* We need the real data property in case of IDProperty here... */
- PropertyRNA *real_prop = rna_ensure_property_realdata(&prop, ptr);
- if (real_prop == NULL || !RNA_property_overridable_get(ptr, real_prop)) {
+ if (!RNA_property_overridable_get(ptr, prop)) {
if (!(*r_info)[0]) {
*r_info = N_("Can't edit this property from an override data-block");
}