diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-11 17:18:01 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-08-11 18:08:41 +0300 |
commit | c034193821ec7e67a0ae1050c8ccef7b5cd5473b (patch) | |
tree | 156f5d5a3f24f6502bdae0052bd82e73fdee61fb /source/blender/blenkernel/intern/DerivedMesh.c | |
parent | e324172d9ca6690e8bd2c0a53f0f7ad529d8e241 (diff) |
Cleanup: remove useless `DM_ensure_looptri()`.
That one was doing exactly same thing as `dm->getLoopTriArray()`, no
point in having twice the same code here...
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 17e805cef70..7a05ab4530c 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -238,7 +238,7 @@ static int dm_getNumLoopTri(DerivedMesh *dm) static const MLoopTri *dm_getLoopTriArray(DerivedMesh *dm) { if (dm->looptris.array) { - BLI_assert(poly_to_tri_count(dm->numPolyData, dm->numLoopData) == dm->looptris.num); + BLI_assert(dm->getNumLoopTri(dm) == dm->looptris.num); } else { dm->recalcLoopTri(dm); @@ -510,19 +510,6 @@ void DM_ensure_looptri_data(DerivedMesh *dm) } } -/** - * The purpose of this function is that we can call: - * `dm->getLoopTriArray(dm)` and get the array returned. - */ -void DM_ensure_looptri(DerivedMesh *dm) -{ - const int numPolys = dm->getNumPolys(dm); - - if ((dm->looptris.num == 0) && (numPolys != 0)) { - dm->recalcLoopTri(dm); - } -} - void DM_verttri_from_looptri(MVertTri *verttri, const MLoop *mloop, const MLoopTri *looptri, int looptri_num) { int i; @@ -2214,7 +2201,6 @@ static void mesh_calc_modifiers( if (dataMask & CD_MASK_MFACE) { DM_ensure_tessface(finaldm); } - DM_ensure_looptri(finaldm); /* without this, drawing ngon tri's faces will show ugly tessellated face * normals and will also have to calculate normals on the fly, try avoid |