fix [#30651] bpy.ops.object.mode_set(...) editmode removes faces.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 27 Mar 2012 00:01:35 +0000 (00:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 27 Mar 2012 00:01:35 +0000 (00:01 +0000)
commitca05219f3ec3574d2e1cb9c8eaa2790f685f26bb
treeb4cfdda1c423fe0552f024c06363272c5f3d8eff
parent4d802ff682b81143012d9a10cf6a58322dd18d89
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.
13 files changed:
source/blender/blenkernel/BKE_tessmesh.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/editors/include/ED_mesh.h
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/object/object_edit.c
source/blender/editors/util/undo.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_particle_types.h