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:
Lukas Toenne
2013-01-28 12:17:49 +00:00
parent 8445a56b48
commit c8d29c1af8

View File

@@ -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,