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:
authorJulian Eisel <julian@blender.org>2021-06-05 18:51:46 +0300
committerJulian Eisel <julian@blender.org>2021-06-05 18:51:46 +0300
commit87a821397fa4db7b72ea809ee29c319cf4788a1a (patch)
tree5b14c3657585b7e64ce1a3e14492925e0a79f473 /source/blender/python/bmesh/bmesh_py_types.c
parentd6e9b0ce5d61f64a3879459c9d39a151aabdea81 (diff)
parentedaaa2afddb2132e56f39791e559b084b6df8773 (diff)
Merge branch 'master' into asset-system-filelistasset-system-filelist
Diffstat (limited to 'source/blender/python/bmesh/bmesh_py_types.c')
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index f1a8d450ea5..598640f8f68 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -1385,7 +1385,6 @@ static PyObject *bpy_bmesh_calc_loop_triangles(BPy_BMElem *self)
BMesh *bm;
int looptris_tot;
- int tottri;
BMLoop *(*looptris)[3];
PyObject *ret;
@@ -1398,10 +1397,10 @@ static PyObject *bpy_bmesh_calc_loop_triangles(BPy_BMElem *self)
looptris_tot = poly_to_tri_count(bm->totface, bm->totloop);
looptris = PyMem_MALLOC(sizeof(*looptris) * looptris_tot);
- BM_mesh_calc_tessellation(bm, looptris, &tottri);
+ BM_mesh_calc_tessellation(bm, looptris);
- ret = PyList_New(tottri);
- for (i = 0; i < tottri; i++) {
+ ret = PyList_New(looptris_tot);
+ for (i = 0; i < looptris_tot; i++) {
PyList_SET_ITEM(ret, i, BPy_BMLoop_Array_As_Tuple(bm, looptris[i], 3));
}