Fix #103865: keep IDProperties overridable when setting them with Python

Previously, the overridable status was lost when assigning a new value
to a custom property.

Pull Request #105130
This commit is contained in:
2023-02-23 15:55:42 +01:00
parent e2f0a63e55
commit 763f1897c2

View File

@@ -746,7 +746,13 @@ bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group,
MEM_freeN(prop);
}
else {
const bool overridable = prop_exist ?
(prop_exist->flag & IDP_FLAG_OVERRIDABLE_LIBRARY) != 0 :
false;
IDP_ReplaceInGroup_ex(group, prop, prop_exist);
if (overridable) {
prop->flag |= IDP_FLAG_OVERRIDABLE_LIBRARY;
}
}
}