diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-27 04:01:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-27 04:01:35 +0400 |
commit | ca05219f3ec3574d2e1cb9c8eaa2790f685f26bb (patch) | |
tree | b4cfdda1c423fe0552f024c06363272c5f3d8eff /source/blender/editors/util/undo.c | |
parent | 4d802ff682b81143012d9a10cf6a58322dd18d89 (diff) |
fix [#30651] bpy.ops.object.mode_set(...) editmode removes faces.
problem was that BMesh had tessellation call when undo pushes were called.
if python called an operator with no undo push, tessfaces would not be created.
fix this by making it the responsibility of each editmesh operator to re-tessellate, as it is with notifiers and depsgraph.
added EDBM_update_generic() function to add notifier, tag for depsgraph update and optionally re-tessellate.
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r-- | source/blender/editors/util/undo.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 40a95fc08ba..69dc1d1f1fb 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -48,8 +48,6 @@ #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" @@ -88,19 +86,6 @@ 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_RecalcTessellation(me->edit_btmesh); - } - } - -#endif /* BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND */ - if (U.undosteps == 0) return; if (obedit->type==OB_MESH) |