PyAPI: include the property name & type in registration errors

This gives useful context in errors,
also remove newline endings from exceptions.
This commit is contained in:
2021-07-30 16:04:00 +10:00
parent 9764d90fda
commit d06b03f80d
2 changed files with 24 additions and 10 deletions

View File

@@ -33,7 +33,10 @@ StructRNA *pointer_type_from_py(PyObject *value, const char *error_prefix);
typedef struct {
PyObject_HEAD
/* This isn't GC tracked, it's a function from `bpy.props` so it's not going away. */
/**
* Internally a #PyCFunctionObject type.
* \note This isn't GC tracked, it's a function from `bpy.props` so it's not going away.
*/
void *fn;
PyObject *kw;
} BPy_PropDeferred;