remove unneeded mesh->bmesh conversion code that copied BMLoop data in a separate loop (since there is no longer pre-allocated loop data on the new BMLoops).

This commit is contained in:
Campbell Barton
2012-11-29 16:36:16 +00:00
parent 7d62e6d94a
commit ce3ea8942c

View File

@@ -338,7 +338,7 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
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 */
@@ -347,23 +347,6 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
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,