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>2012-12-27 11:27:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-12-27 11:27:28 +0400
commitdaa2a0d1c3099c85b4235c6e3f9af0b5ee60de24 (patch)
treeaea62f3acebffbf5b1cfe45ec9a2dcbb4d229bf8 /source/blender/python/bmesh/bmesh_py_api.c
parentf0c1bc830c790f46fbe971ab7242dfb7b1cad469 (diff)
use keyword args for bmesh.update_edit_mesh(...)
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_api.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index 9abb13731af..ce8153fb994 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -110,14 +110,17 @@ PyDoc_STRVAR(bpy_bm_update_edit_mesh_doc,
" :arg destructive: Use when grometry has been added or removed.\n"
" :type destructive: boolean\n"
);
-static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args)
+static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args, PyObject *kw)
{
+ static const char *kwlist[] = {"mesh", "tessface", "destructive", NULL};
PyObject *py_me;
Mesh *me;
int do_tessface = TRUE;
int is_destructive = TRUE;
- if (!PyArg_ParseTuple(args, "O|ii:update_edit_mesh", &py_me, &do_tessface, &is_destructive)) {
+ if (!PyArg_ParseTupleAndKeywords(args, kw, "O|ii:update_edit_mesh", (char **)kwlist,
+ &py_me, &do_tessface, &is_destructive))
+ {
return NULL;
}
@@ -144,7 +147,7 @@ static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args)
static struct PyMethodDef BPy_BM_methods[] = {
{"new", (PyCFunction)bpy_bm_new, METH_NOARGS, bpy_bm_new_doc},
{"from_edit_mesh", (PyCFunction)bpy_bm_from_edit_mesh, METH_O, bpy_bm_from_edit_mesh_doc},
- {"update_edit_mesh", (PyCFunction)bpy_bm_update_edit_mesh, METH_VARARGS, bpy_bm_update_edit_mesh_doc},
+ {"update_edit_mesh", (PyCFunction)bpy_bm_update_edit_mesh, METH_VARARGS | METH_KEYWORDS, bpy_bm_update_edit_mesh_doc},
{NULL, NULL, 0, NULL}
};