diff options
Diffstat (limited to 'source')
-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; |