diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-01-28 16:17:49 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-01-28 16:17:49 +0400 |
commit | c8d29c1af8ccab4bd401220a1e717de69348548c (patch) | |
tree | f1888860a178bf6675c992053205fb5d97900178 /source/blender/python | |
parent | 8445a56b488f45d9ef6aebcf0ef23a8a5203e0b4 (diff) |
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.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 85a6db00703..4de92d090fc 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -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, |