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 <montagne29@wanadoo.fr>2019-09-24 18:21:21 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-09-25 15:27:47 +0300
commit1201352217a8cd3072eea3a1109a8a19915be14d (patch)
treeb403d0517b968f87c7c69434d272f70b08071bd1 /source/blender/makesrna/intern/rna_rna.c
parentef60cf8fca6a0f51eaf7adbcea2e644628e3049e (diff)
LibOverride: Fix several issues in handling of overridable status for IDProps.
The triple possible status of an PropertyRNA (actual C-defined prop, py-defined IDprop behaving similar ot RNA one, or actual 'pure' custom prop) is really confusing... Not to mention the _RNA_UI ugly thingy on top of that. :/
Diffstat (limited to 'source/blender/makesrna/intern/rna_rna.c')
-rw-r--r--source/blender/makesrna/intern/rna_rna.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 6e21d02c0b3..26c8df4c7bb 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -613,7 +613,10 @@ static bool rna_Property_overridable_get(PointerRNA *ptr)
{
PropertyRNA *prop = (PropertyRNA *)ptr->data;
- return (prop->flag_override & PROPOVERRIDE_OVERRIDABLE_LIBRARY) != 0;
+ IDProperty *idprop = rna_idproperty_check(&prop, ptr);
+
+ return idprop != NULL ? (idprop->flag & IDP_FLAG_OVERRIDABLE_LIBRARY) != 0 :
+ (prop->flag_override & PROPOVERRIDE_OVERRIDABLE_LIBRARY) != 0;
}
static bool rna_Property_use_output_get(PointerRNA *ptr)