Fix #32334: mesh separate by material with > 2 materials could include some

incorrect extra edges.
This commit is contained in:
Brecht Van Lommel
2012-08-21 14:49:07 +00:00
parent 8bd7c3fba2
commit 857a3cd112

View File

@@ -2958,12 +2958,12 @@ static int mesh_separate_material(Main *bmain, Scene *scene, Base *base_old, BMe
BMIter iter;
int result = FALSE;
BM_mesh_elem_hflag_disable_all(bm_old, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_TAG, FALSE);
while ((f_cmp = BM_iter_at_index(bm_old, BM_FACES_OF_MESH, NULL, 0))) {
const short mat_nr = f_cmp->mat_nr;
int tot = 0;
BM_mesh_elem_hflag_disable_all(bm_old, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_TAG, FALSE);
BM_ITER_MESH (f, &iter, bm_old, BM_FACES_OF_MESH) {
if (f->mat_nr == mat_nr) {
BMLoop *l_iter;