diff options
author | Andrew Wiggin <ender79bl@gmail.com> | 2011-10-06 06:05:27 +0400 |
---|---|---|
committer | Andrew Wiggin <ender79bl@gmail.com> | 2011-10-06 06:05:27 +0400 |
commit | d525cb154f99a9d4b53e1b034628cde6fee414ac (patch) | |
tree | 20d6cf6c15c4069e322962a20d034f3d1b523ee0 /source/blender | |
parent | 8d7d3b2837009535a4b1058ba386e4549ac70dba (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/mesh/mesh_ops.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_build.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index d7a93283640..db52df611b0 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -119,7 +119,7 @@ void ED_operatortypes_mesh(void) WM_operatortype_append(MESH_OT_edge_flip); WM_operatortype_append(MESH_OT_faces_shade_smooth); WM_operatortype_append(MESH_OT_faces_shade_flat); - //WM_operatortype_append(MESH_OT_sort_faces); + WM_operatortype_append(MESH_OT_sort_faces); WM_operatortype_append(MESH_OT_delete); 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), |