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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-23 02:49:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-23 02:50:48 +0300
commite5182fa101a47d974e0d88c371bd7f3191cc656b (patch)
tree8e3bd0ba7ad906709b5bc543ec096ceea860f494 /source/blender/python
parent43c6aba6705111f93fee903480e96a96c298f97d (diff)
Cleanup: rename VertBuf.fill_attribute > attr_fill
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c6
-rw-r--r--source/blender/python/gpu/gpu_py_vertex_buffer.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 07a139de418..061c844a54d 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -572,15 +572,15 @@ static PyObject *bpygpu_shader_attr_from_name(
return NULL;
}
- int attrib = GPU_shader_get_attribute(self->shader, name);
+ int attr = GPU_shader_get_attribute(self->shader, name);
- if (attrib == -1) {
+ if (attr == -1) {
PyErr_Format(PyExc_ValueError,
"GPUShader.attr_from_name: attribute %.32s not found", name);
return NULL;
}
- return PyLong_FromLong(attrib);
+ return PyLong_FromLong(attr);
}
PyDoc_STRVAR(bpygpu_shader_calc_format_doc,
diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.c b/source/blender/python/gpu/gpu_py_vertex_buffer.c
index 0814e0586c9..c4a4c9ea3de 100644
--- a/source/blender/python/gpu/gpu_py_vertex_buffer.c
+++ b/source/blender/python/gpu/gpu_py_vertex_buffer.c
@@ -189,7 +189,7 @@ finally:
return ok;
}
-static int bpygpu_fill_attribute(GPUVertBuf *buf, int id, PyObject *py_seq_data, const char *error_prefix)
+static int bpygpu_attr_fill(GPUVertBuf *buf, int id, PyObject *py_seq_data, const char *error_prefix)
{
if (id < 0 || id >= buf->format.attr_len) {
PyErr_Format(PyExc_ValueError,
@@ -265,8 +265,8 @@ static PyObject *bpygpu_VertBuf_new(PyTypeObject *UNUSED(type), PyObject *args,
return BPyGPUVertBuf_CreatePyObject(vbo);
}
-PyDoc_STRVAR(bpygpu_VertBuf_fill_attribute_doc,
-"fill_attribute(identifier, data)\n"
+PyDoc_STRVAR(bpygpu_VertBuf_attr_fill_doc,
+"attr_fill(identifier, data)\n"
"\n"
" Insert data into the buffer for a single attribute.\n"
"\n"
@@ -275,13 +275,13 @@ PyDoc_STRVAR(bpygpu_VertBuf_fill_attribute_doc,
" :param data: Sequence of data that should be stored in the buffer\n"
" :type data: sequence of individual values or tuples\n"
);
-static PyObject *bpygpu_VertBuf_fill_attribute(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds)
+static PyObject *bpygpu_VertBuf_attr_fill(BPyGPUVertBuf *self, PyObject *args, PyObject *kwds)
{
PyObject *data;
PyObject *identifier;
static const char *_keywords[] = {"identifier", "data", NULL};
- static _PyArg_Parser _parser = {"OO:fill_attribute", _keywords, 0};
+ static _PyArg_Parser _parser = {"OO:attr_fill", _keywords, 0};
if (!_PyArg_ParseTupleAndKeywordsFast(
args, kwds, &_parser,
&identifier, &data))
@@ -310,7 +310,7 @@ static PyObject *bpygpu_VertBuf_fill_attribute(BPyGPUVertBuf *self, PyObject *ar
}
- if (!bpygpu_fill_attribute(self->buf, id, data, "GPUVertBuf.fill_attribute")) {
+ if (!bpygpu_attr_fill(self->buf, id, data, "GPUVertBuf.attr_fill")) {
return NULL;
}
@@ -319,8 +319,8 @@ static PyObject *bpygpu_VertBuf_fill_attribute(BPyGPUVertBuf *self, PyObject *ar
static struct PyMethodDef bpygpu_VertBuf_methods[] = {
- {"fill_attribute", (PyCFunction) bpygpu_VertBuf_fill_attribute,
- METH_VARARGS | METH_KEYWORDS, bpygpu_VertBuf_fill_attribute_doc},
+ {"attr_fill", (PyCFunction) bpygpu_VertBuf_attr_fill,
+ METH_VARARGS | METH_KEYWORDS, bpygpu_VertBuf_attr_fill_doc},
{NULL, NULL, 0, NULL}
};