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:
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_api.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_api.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index 51c4acda45e..1601034542b 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -57,14 +57,11 @@ PyDoc_STRVAR(bpy_bm_new_doc,
static PyObject *bpy_bm_new(PyObject *UNUSED(self))
{
- BPy_BMesh *py_bmesh;
BMesh *bm;
bm = BM_mesh_create(NULL, &bm_mesh_allocsize_default);
- py_bmesh = (BPy_BMesh *)BPy_BMesh_CreatePyObject(bm);
- py_bmesh->py_owns = TRUE;
- return (PyObject *)py_bmesh;
+ return BPy_BMesh_CreatePyObject(bm, BPY_BMFLAG_NOP);
}
PyDoc_STRVAR(bpy_bm_from_edit_mesh_doc,
@@ -77,7 +74,6 @@ PyDoc_STRVAR(bpy_bm_from_edit_mesh_doc,
);
static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value)
{
- BPy_BMesh *py_bmesh;
BMesh *bm;
Mesh *me = PyC_RNA_AsPointer(value, "Mesh");
@@ -93,9 +89,7 @@ static PyObject *bpy_bm_from_edit_mesh(PyObject *UNUSED(self), PyObject *value)
bm = me->edit_btmesh->bm;
- py_bmesh = (BPy_BMesh *)BPy_BMesh_CreatePyObject(bm);
- py_bmesh->py_owns = FALSE;
- return (PyObject *)py_bmesh;
+ return BPy_BMesh_CreatePyObject(bm, BPY_BMFLAG_IS_WRAPPED);
}
static struct PyMethodDef BPy_BM_methods[] = {