Fix mesh-validate for polys using successive verts

This commit is contained in:
Campbell Barton 2015-03-03 15:32:35 +11:00
parent 34003dd034
commit 26a251202b
1 changed files with 6 additions and 4 deletions

View File

@ -1472,12 +1472,14 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select)
/* mesh loops (bmesh only) */
for (mp = mesh->mpoly, i = 0; i < totpoly; mp++, i++) {
MLoop *l = &mesh->mloop[mp->loopstart];
int j, l_prev = (l + (mp->totloop - 1))->v;
int j, v_prev = (l + (mp->totloop - 1))->v;
for (j = 0; j < mp->totloop; j++, l++) {
if (!BLI_edgehash_haskey(eh, l_prev, l->v)) {
BLI_edgehash_insert(eh, l_prev, l->v, NULL);
if (v_prev != l->v) {
if (!BLI_edgehash_haskey(eh, v_prev, l->v)) {
BLI_edgehash_insert(eh, v_prev, l->v, NULL);
}
}
l_prev = l->v;
v_prev = l->v;
}
}