Fix for RNA FUNC_REGISTER/FUNC_REGISTER_OPTIONAL flags: The test in bpy validation of classes actually always passed for mandatory functions. This only worked since they all use fallback default implementations internally.
This commit is contained in:
@@ -6857,7 +6857,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
|
||||
i++;
|
||||
|
||||
if (item == NULL) {
|
||||
if ((flag & FUNC_REGISTER_OPTIONAL) == 0) {
|
||||
if ((flag & (FUNC_REGISTER_OPTIONAL & ~FUNC_REGISTER)) == 0) {
|
||||
PyErr_Format(PyExc_AttributeError,
|
||||
"expected %.200s, %.200s class to have an \"%.200s\" attribute",
|
||||
class_type, py_class_name,
|
||||
|
Reference in New Issue
Block a user