a few trivial bug fixes

This commit is contained in:
Andrew Wiggin
2011-10-11 04:30:04 +00:00
parent 69732dbe21
commit 1dccb351e5
3 changed files with 5 additions and 8 deletions

View File

@@ -439,6 +439,8 @@ void BM_Vert_UpdateNormal(BMesh *bm, BMVert *v)
fac = saacos(-dot_v3v3(vec1, vec2));
madd_v3_v3fl(v->no, l->f->no, fac);
len++;
}
}
}
@@ -454,17 +456,12 @@ void BM_Vert_UpdateAllNormals(BMesh *bm, BMVert *v)
BMFace *f;
int len=0;
zero_v3(v->no);
f = BMIter_New(&iter, bm, BM_FACES_OF_VERT, v);
for (; f; f=BMIter_Step(&iter), len++) {
BM_Face_UpdateNormal(bm, f);
add_v3_v3v3(v->no, f->no, v->no);
}
if (!len) return;
mul_v3_fl(v->no, 1.0f/(float)len);
BM_Vert_UpdateNormal(bm, v);
}
void bmesh_update_face_normal(BMesh *bm, BMFace *f, float (*projectverts)[3])

View File

@@ -212,7 +212,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), subdparams *p
vec1[2]+= fac*nor2[2];
/* falloff for multi subdivide */
smooth *= sqrtf(fabsf(1.0f - 2.0f*fabsf(perc)));
smooth *= sqrtf(fabsf(1.0f - 2.0f*fabsf(0.5f-perc)));
vec1[0]*= smooth*len;
vec1[1]*= smooth*len;

View File

@@ -1162,7 +1162,7 @@ static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *e
BMVert *v;
index = 0;
BM_ITER(v, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
if (v == eve)
break;
index++;