diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-27 05:28:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-27 05:28:25 +0400 |
commit | f83a93e454e4a92d9619bc5bd16d73525e41ce46 (patch) | |
tree | 595264dbcf15b38e3f85c2238facea799fe28277 /source/blender/editors/mesh/editmesh_utils.c | |
parent | ae654301b041cae9cce8107614c1d17bae3ff12a (diff) |
bmesh todo, unlikly but possible - entering editmode with faces and no polys.
rather then printing a warning and failing - convert them to polys.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_utils.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 1c889a6169e..5d2bb359d3c 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -265,16 +265,12 @@ void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) Mesh *me = ob->data; BMesh *bm; - if (!me->mpoly && me->totface) { - fprintf(stderr, "%s: bmesh conversion issue! may lose lots of geometry! (bmesh internal error)\n", __func__); - - /* BMESH_TODO need to write smarter code here */ - bm = BKE_mesh_to_bmesh(me, ob); - } - else { - bm = BKE_mesh_to_bmesh(me, ob); + if (UNLIKELY(!me->mpoly && me->totface)) { + BKE_mesh_convert_mfaces_to_mpolys(me); } + bm = BKE_mesh_to_bmesh(me, ob); + if (me->edit_btmesh) { /* this happens when switching shape keys */ BMEdit_Free(me->edit_btmesh); |