From d525cb154f99a9d4b53e1b034628cde6fee414ac Mon Sep 17 00:00:00 2001 From: Andrew Wiggin Date: Thu, 6 Oct 2011 02:05:27 +0000 Subject: Enable sort faces tool (checked in code for the tool but forgot to uncomment the line to hook it up), and fix for an uninitialized local in build modifier. --- source/blender/modifiers/intern/MOD_build.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/modifiers/intern/MOD_build.c') diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index ee38ba41171..3d31c9c6bb7 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -86,7 +86,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *result; BuildModifierData *bmd = (BuildModifierData*) md; int i, j, k; - int numFaces, numEdges, numLoops; + int numFaces, numEdges, numLoops = 0; int *vertMap, *edgeMap, *faceMap; float frac; MPoly *mpolys, *mpolyd; @@ -141,7 +141,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, /* get the set of all vert indices that will be in the final mesh, * mapped to the new indices */ - numLoops = 0; mpoly = CDDM_get_polys(dm); mloop = CDDM_get_loops(dm); for(i = 0; i < numFaces; ++i) { @@ -175,7 +174,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } } else if(numEdges) { MEdge *medge, *me; - + if(bmd->randomize) BLI_array_randomize(edgeMap, sizeof(*edgeMap), maxEdges, bmd->seed); @@ -207,7 +206,6 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, } } else { int numVerts = dm->getNumVerts(dm) * frac; - numLoops= 0; if(bmd->randomize) BLI_array_randomize(vertMap, sizeof(*vertMap), -- cgit v1.2.3