diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 5378ce7872a..89a786d02a9 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -274,7 +274,8 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) if (ss->modifiers_active) { Mesh *mesh = ob->data; - mesh_calc_normals_mapping(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); + mesh_calc_normals_tessface(mesh->mvert, mesh->totvert, + mesh->mface, mesh->totface, NULL); free_sculptsession_deformMats(ss); tag_update |= 1; @@ -471,14 +472,6 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, BLI_unlock_thread(LOCK_CUSTOM1); /* copy threaded, hopefully this is the performance critical part */ - switch (type) { - case SCULPT_UNDO_COORDS: - sculpt_undo_store_coords(ob, unode); - break; - case SCULPT_UNDO_HIDDEN: - sculpt_undo_store_hidden(ob, unode); - break; - } if (unode->grids) { int totgrid, *grids; @@ -493,6 +486,15 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, memcpy(unode->index, vert_indices, sizeof(int) * unode->totvert); } + switch (type) { + case SCULPT_UNDO_COORDS: + sculpt_undo_store_coords(ob, unode); + break; + case SCULPT_UNDO_HIDDEN: + sculpt_undo_store_hidden(ob, unode); + break; + } + /* store active shape key */ if (ss->kb) BLI_strncpy(unode->shapeName, ss->kb->name, sizeof(ss->kb->name)); else unode->shapeName[0] = '\0';