Python: Add more useful information when attempting to pass incorrect attributes to GPUVertBuf.attr_fill

This simply adds the name of the incorrect parameter to the error message.

Differential Revision: https://developer.blender.org/D14103

Reviewed by Jeroen Bakker
This commit is contained in:
Colin Basnett 2022-08-04 15:51:54 -07:00
parent 5b8143287b
commit 9da0cfb86e
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ static PyObject *pygpu_vertbuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, Py
const char *name = PyUnicode_AsUTF8(identifier);
id = GPU_vertformat_attr_id_get(format, name);
if (id == -1) {
PyErr_SetString(PyExc_ValueError, "Unknown attribute name");
PyErr_Format(PyExc_ValueError, "Unknown attribute '%s'", name);
return NULL;
}
}