diff options
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_api.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_api.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c index d7324eabb6c..235ede1e8fd 100644 --- a/source/blender/python/bmesh/bmesh_py_api.c +++ b/source/blender/python/bmesh/bmesh_py_api.c @@ -113,30 +113,30 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value) } PyDoc_STRVAR(bpy_bm_update_edit_mesh_doc, -".. method:: update_edit_mesh(mesh, tessface=True, destructive=True)\n" +".. method:: update_edit_mesh(mesh, loop_triangles=True, destructive=True)\n" "\n" " Update the mesh after changes to the BMesh in editmode, \n" " optionally recalculating n-gon tessellation.\n" "\n" " :arg mesh: The editmode mesh.\n" " :type mesh: :class:`bpy.types.Mesh`\n" -" :arg tessface: Option to recalculate n-gon tessellation.\n" -" :type tessface: boolean\n" +" :arg loop_triangles: Option to recalculate n-gon tessellation.\n" +" :type loop_triangles: boolean\n" " :arg destructive: Use when geometry has been added or removed.\n" " :type destructive: boolean\n" ); static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args, PyObject *kw) { - static const char *kwlist[] = {"mesh", "tessface", "destructive", NULL}; + static const char *kwlist[] = {"mesh", "loop_triangles", "destructive", NULL}; PyObject *py_me; Mesh *me; - bool do_tessface = true; + bool do_loop_triangles = true; bool is_destructive = true; if (!PyArg_ParseTupleAndKeywords( args, kw, "O|O&O&:update_edit_mesh", (char **)kwlist, &py_me, - PyC_ParseBool, &do_tessface, + PyC_ParseBool, &do_loop_triangles, PyC_ParseBool, &is_destructive)) { return NULL; @@ -156,13 +156,8 @@ static PyObject *bpy_bm_update_edit_mesh(PyObject *UNUSED(self), PyObject *args, { extern void EDBM_update_generic(BMEditMesh *em, const bool do_tessface, const bool is_destructive); - BMEditMesh *em = me->edit_btmesh; - BMesh *bm = em->bm; - /* python won't ensure matching uv/mtex */ - BM_mesh_cd_validate(bm); - - EDBM_update_generic(me->edit_btmesh, do_tessface, is_destructive); + EDBM_update_generic(me->edit_btmesh, do_loop_triangles, is_destructive); } Py_RETURN_NONE; @@ -208,21 +203,17 @@ PyObject *BPyInit_bmesh(void) /* bmesh.types */ PyModule_AddObject(mod, "types", (submodule = BPyInit_bmesh_types())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - Py_INCREF(submodule); /* bmesh.ops (not a real module, exposes module like access). */ PyModule_AddObject(mod, "ops", (submodule = BPyInit_bmesh_ops())); /* PyDict_SetItemString(sys_modules, PyModule_GetNameObject(submodule), submodule); */ PyDict_SetItemString(sys_modules, "bmesh.ops", submodule); /* fake module */ - Py_INCREF(submodule); PyModule_AddObject(mod, "utils", (submodule = BPyInit_bmesh_utils())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - Py_INCREF(submodule); PyModule_AddObject(mod, "geometry", (submodule = BPyInit_bmesh_geometry())); PyDict_SetItem(sys_modules, PyModule_GetNameObject(submodule), submodule); - Py_INCREF(submodule); return mod; } |