j = 0;
BM_ITER_ELEM_INDEX (l, &iter, f, BM_LOOPS_OF_FACE, j) {
/* Save index of correspsonding MLoop */
- BM_elem_index_set(l, mpoly->loopstart + j); /* set_loop */
+ CustomData_to_bmesh_block(&me->ldata, &bm->ldata, mpoly->loopstart + j, &l->head.data);
}
/* Copy Custom Data */
bm->elem_index_dirty &= ~BM_FACE; /* added in order, clear dirty flag */
- {
- BMIter fiter;
- BMIter liter;
-
- /* Copy over loop CustomData. Doing this in a separate loop isn't necessary
- * but is an optimization, to avoid copying a bunch of interpolated customdata
- * for each BMLoop (from previous BMLoops using the same edge), always followed
- * by freeing the interpolated data and overwriting it with data from the Mesh. */
- BM_ITER_MESH (f, &fiter, bm, BM_FACES_OF_MESH) {
- BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) {
- int li = BM_elem_index_get(l);
- CustomData_to_bmesh_block(&me->ldata, &bm->ldata, li, &l->head.data);
- BM_elem_index_set(l, 0); /* set_loop */
- }
- }
- }
-
if (me->mselect && me->totselect != 0) {
BMVert **vert_array = MEM_callocN(sizeof(BMVert *) * bm->totvert,