IDProps: Make overridable IDProps systematically statically typed.

LibOverride gets practically useless when types of 'matching' data
differs between the linked reference data and the overridden one.

Ref. #122743.
This commit is contained in:
Bastien Montagne
2024-06-13 19:15:04 +02:00
committed by Bastien Montagne
parent b278e37f70
commit 76f03eb141

View File

@@ -181,9 +181,8 @@ bool RNA_property_overridable_library_set(PointerRNA * /*ptr*/,
/* Only works for pure custom properties IDProps. */
if (prop->magic != RNA_MAGIC) {
IDProperty *idprop = (IDProperty *)prop;
idprop->flag = is_overridable ? (idprop->flag | IDP_FLAG_OVERRIDABLE_LIBRARY) :
(idprop->flag & ~IDP_FLAG_OVERRIDABLE_LIBRARY);
constexpr short flags = (IDP_FLAG_OVERRIDABLE_LIBRARY | IDP_FLAG_STATIC_TYPE);
idprop->flag = is_overridable ? (idprop->flag | flags) : (idprop->flag & ~flags);
return true;
}