diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-07-16 05:50:34 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-07-16 05:50:34 +0400 |
commit | 28940d79b1946df721fc6f11b65bb074d05ad44c (patch) | |
tree | 1189b9ea455e95113495208804ee6976a1129107 /source/blender/python/bmesh/bmesh_py_utils.c | |
parent | b26daac398b6dddaeecb6885b5e6f388e7f2e931 (diff) |
bmesh py api: add typed tuple-from-array functions
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_utils.c')
-rw-r--r-- | source/blender/python/bmesh/bmesh_py_utils.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c index cd5290bcd91..a1e11d197d5 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.c +++ b/source/blender/python/bmesh/bmesh_py_utils.c @@ -247,7 +247,7 @@ static PyObject *bpy_bm_utils_vert_separate(PyObject *UNUSED(self), PyObject *ar BM_vert_separate(bm, py_vert->v, &elem, &elem_len, edge_array, edge_array_len); /* return collected verts */ - ret = BPy_BMElem_Array_As_Tuple(bm, (BMHeader **)elem, elem_len); + ret = BPy_BMVert_Array_As_Tuple(bm, elem, elem_len); MEM_freeN(elem); PyMem_FREE(edge_array); @@ -535,11 +535,7 @@ static PyObject *bpy_bm_utils_face_split_edgenet(PyObject *UNUSED(self), PyObjec PyMem_FREE(edge_array); if (ok) { - PyObject *ret = PyTuple_New(face_arr_len); - int i; - for (i = 0; i < face_arr_len; i++) { - PyTuple_SET_ITEM(ret, i, BPy_BMFace_CreatePyObject(bm, face_arr[i])); - } + PyObject *ret = BPy_BMFace_Array_As_Tuple(bm, face_arr, face_arr_len); MEM_freeN(face_arr); return ret; } |