diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-24 18:21:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-09-25 15:27:47 +0300 |
commit | 1201352217a8cd3072eea3a1109a8a19915be14d (patch) | |
tree | b403d0517b968f87c7c69434d272f70b08071bd1 /source/blender/makesrna/intern/rna_rna.c | |
parent | ef60cf8fca6a0f51eaf7adbcea2e644628e3049e (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.c | 5 |
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) |