From f2cc6c9254be5fe093e112f3b6e2192b392a1843 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 May 2017 00:34:14 +1000 Subject: TexFace removal part 2 - Derived-mesh drawing. - All non UV members of TexFace structs. MTexPoly is now redundant but keeping with a dummy member, will check on complete removal later. --- source/blender/modifiers/intern/MOD_uvproject.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source/blender/modifiers') diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index 10e174415e5..247d12aefcb 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -132,7 +132,6 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, { float (*coords)[3], (*co)[3]; MLoopUV *mloop_uv; - MTexPoly *mtexpoly, *mt = NULL; int i, numVerts, numPolys, numLoops; Image *image = umd->image; MPoly *mpoly, *mp; @@ -221,10 +220,6 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, mloop_uv = CustomData_duplicate_referenced_layer_named(&dm->loopData, CD_MLOOPUV, uvname, numLoops); - /* can be NULL */ - mt = mtexpoly = CustomData_duplicate_referenced_layer_named(&dm->polyData, - CD_MTEXPOLY, uvname, numPolys); - numVerts = dm->getNumVerts(dm); coords = MEM_mallocN(sizeof(*coords) * numVerts, @@ -249,8 +244,8 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd, } /* apply coords as UVs, and apply image if tfaces are new */ - for (i = 0, mp = mpoly; i < numPolys; ++i, ++mp, ++mt) { - if (!image || (mtexpoly == NULL || (mp->mat_nr < ob->totcol ? ob_image_array[mp->mat_nr] : NULL) == image)) { + for (i = 0, mp = mpoly; i < numPolys; ++i, ++mp) { + if (!image || (mp->mat_nr < ob->totcol ? ob_image_array[mp->mat_nr] : NULL) == image) { if (num_projectors == 1) { if (projectors[0].uci) { unsigned int fidx = mp->totloop - 1; -- cgit v1.2.3