diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-08-21 18:49:07 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-08-21 18:49:07 +0400 |
commit | 857a3cd1120c402e22928e7d43612a9fee72a80d (patch) | |
tree | bc170b2cf487a2aa863eb61f315498b853362d20 /source/blender/editors/mesh | |
parent | 8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb (diff) |
Fix #32334: mesh separate by material with > 2 materials could include some
incorrect extra edges.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 3de945fb06c..3945c1bb57a 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -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; |