From 6f88dca9c34b70905930067055935dea18757fec Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 19 Aug 2013 14:08:59 +0000 Subject: Dyntopo: Turn off pbvh normal update flag after recalculation, saves recalculating normals every frame when not stroking the mesh. For this to work reliably with undo we need to support original normals in the bm_log (was marked as a TODO already in the code), so that undoing avoids having invalid normals in the mesh (since we don't update every frame anymore). This was added in this commit as well. Also added some (disabled) quite paranoid checks in the bmesh valication code for dyntopo hoping to catch the real normal update issue. No luck there yet. --- source/blender/bmesh/intern/bmesh_log.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/bmesh/intern/bmesh_log.h') diff --git a/source/blender/bmesh/intern/bmesh_log.h b/source/blender/bmesh/intern/bmesh_log.h index 958ff340b43..4767c82ff2f 100644 --- a/source/blender/bmesh/intern/bmesh_log.h +++ b/source/blender/bmesh/intern/bmesh_log.h @@ -92,6 +92,9 @@ void BM_log_before_all_removed(BMesh *bm, BMLog *log); /* Get the logged coordinates of a vertex */ const float *BM_log_original_vert_co(BMLog *log, BMVert *v); +/* Get the logged normal of a vertex */ +const short *BM_log_original_vert_no(BMLog *log, BMVert *v); + /* Get the logged mask of a vertex */ float BM_log_original_mask(BMLog *log, BMVert *v); -- cgit v1.2.3