Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Basnett <cmbasnett@gmail.com>2022-08-05 01:51:54 +0300
committerColin Basnett <cmbasnett@gmail.com>2022-08-05 01:54:00 +0300
commit9da0cfb86ee098b9172da69bb43703aa2efba691 (patch)
tree30868ec61e0975bb94ea9c443d70edabedcc0921 /source/blender/python
parent5b8143287b607e52a65082fd6a678d0e54f50826 (diff)
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
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/gpu/gpu_py_vertex_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.c b/source/blender/python/gpu/gpu_py_vertex_buffer.c
index ac050128a1d..ab2ff59a689 100644
--- a/source/blender/python/gpu/gpu_py_vertex_buffer.c
+++ b/source/blender/python/gpu/gpu_py_vertex_buffer.c
@@ -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;
}
}