[Bf-blender-cvs] [f5aac6662d3] master: Fix GPUShader.format_calc documentation
Germano Cavalcante
noreply at git.blender.org
Fri Aug 19 01:40:51 CEST 2022
Commit: f5aac6662d354de07d4693862287bcb869d3e73c
Author: Germano Cavalcante
Date: Thu Aug 18 09:32:49 2022 -0300
Branches: master
https://developer.blender.org/rBf5aac6662d354de07d4693862287bcb869d3e73c
Fix GPUShader.format_calc documentation
`format_calc` instead of `calc_format`.
===================================================================
M source/blender/python/gpu/gpu_py_shader.c
===================================================================
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index e3f789aa58d..216f98202d4 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -600,14 +600,14 @@ static PyObject *pygpu_shader_attr_from_name(BPyGPUShader *self, PyObject *arg)
return PyLong_FromLong(attr);
}
-PyDoc_STRVAR(pygpu_shader_calc_format_doc,
- ".. method:: calc_format()\n"
+PyDoc_STRVAR(pygpu_shader_format_calc_doc,
+ ".. method:: format_calc()\n"
"\n"
" Build a new format based on the attributes of the shader.\n"
"\n"
" :return: vertex attribute format for the shader\n"
" :rtype: :class:`gpu.types.GPUVertFormat`\n");
-static PyObject *pygpu_shader_calc_format(BPyGPUShader *self, PyObject *UNUSED(arg))
+static PyObject *pygpu_shader_format_calc(BPyGPUShader *self, PyObject *UNUSED(arg))
{
BPyGPUVertFormat *ret = (BPyGPUVertFormat *)BPyGPUVertFormat_CreatePyObject(NULL);
GPU_vertformat_from_shader(&ret->fmt, self->shader);
@@ -657,9 +657,9 @@ static struct PyMethodDef pygpu_shader__tp_methods[] = {
METH_O,
pygpu_shader_attr_from_name_doc},
{"format_calc",
- (PyCFunction)pygpu_shader_calc_format,
+ (PyCFunction)pygpu_shader_format_calc,
METH_NOARGS,
- pygpu_shader_calc_format_doc},
+ pygpu_shader_format_calc_doc},
{NULL, NULL, 0, NULL},
};
More information about the Bf-blender-cvs
mailing list