Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-12-11 09:05:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-11 09:05:37 +0400
commit8eab2c66a730f837b587b56463ec4437cdb6a787 (patch)
treea73b0b3248c77c52c6c8c85fefa526d2b01e559e /source/blender/editors/util/undo.c
parent5f6ff0f41298bd1e35479dd7bf42d948aa61d44f (diff)
workaround for tessface not being recalculated when undo is disabled
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r--source/blender/editors/util/undo.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index f0055bd6008..996fab59762 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -48,6 +48,8 @@
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_screen.h"
+#include "BKE_tessmesh.h" /* BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND */
+
#include "ED_armature.h"
#include "ED_particle.h"
@@ -86,6 +88,19 @@ void ED_undo_push(bContext *C, const char *str)
printf("undo push %s\n", str);
if(obedit) {
+
+#ifdef BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND
+ /* undo is causing tessface recalc, so without we need to do explicitly */
+
+ if (U.undosteps == 0) {
+ if (obedit->type == OB_MESH) {
+ Mesh *me= obedit->data;
+ BMEdit_RecalcTesselation(me->edit_btmesh);
+ }
+ }
+
+#endif /* BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND */
+
if (U.undosteps == 0) return;
if(obedit->type==OB_MESH)