code cleanup:
[blender.git] / source / blender / blenkernel / intern / key.c
index e36e7bf6cf3730a71c25db6ba6c85ee1ab56c582..f4ec223a2febec8f28dbb75068726455a15ad94e 100644 (file)
@@ -1055,8 +1055,7 @@ static float *get_weights_array(Object *ob, char *vgroup)
                weights = MEM_callocN(totvert * sizeof(float), "weights");
 
                if (em) {
-                       eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
-                       for (i = 0; eve; eve = BM_iter_step(&iter), i++) {
+                       BM_ITER_MESH_INDEX (eve, &iter, em->bm, BM_VERTS_OF_MESH, i) {
                                dvert = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
 
                                if (dvert) {