From 4a5ae4a55f7bf4f4bc4355899ec5eaaa0af32d0c Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 19 Nov 2003 22:00:14 +0000 Subject: Fix for undo... it didn't do the UV coords (tface) nor the vertexpaint colors. This because of the pretty weird (ab)use of load & make editmesh... For each added undo step, the load_editmesh was fed with an empty mesh to assign data to, without knowledge of what was in the original mesh. That way UV and color data got lost. Solved it in 2 steps: 1. removing the ->tface pointer from EditVlak, and make TFace a builtin struct inside EditVlak. This didnt cost much extra mem, since it already stored UV and color. This enabled some pretty cleanup in editmesh.c as well, storing tface pointers was cumbersome. 2. for each undo step, it then generates always a tface and mcol block to link to the undo Mesh. Even when it wasn't in the actual Mesh, at exit editmode the original Mesh is used as reference anyway, and undo-meshes are freed correctly. The enormous commit is because I had to change the BLI_editVert.h file, and found it was included in about every file unnecessary. I removed it there. ALso found out that subsurf has code ready (unfinished) to make UV coords for the displaylist in EditMode as well, nice to know for later... --- source/blender/src/editdeform.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/src/editdeform.c') diff --git a/source/blender/src/editdeform.c b/source/blender/src/editdeform.c index 42b88556214..73bc4d73318 100644 --- a/source/blender/src/editdeform.c +++ b/source/blender/src/editdeform.c @@ -35,12 +35,12 @@ #include "MEM_guardedalloc.h" -#include "BLI_blenlib.h" -#include "BLI_editVert.h" - #include "DNA_mesh_types.h" #include "DNA_object_types.h" +#include "BLI_blenlib.h" +#include "BLI_editVert.h" + #include "BKE_global.h" #include "BKE_deform.h" #include "BKE_mesh.h" -- cgit v1.2.3