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.

This commit is contained in:
2011-10-06 02:05:27 +00:00
parent 8d7d3b2837
commit d525cb154f
2 changed files with 3 additions and 5 deletions

View File

@@ -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);

View File

@@ -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),