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>2012-03-27 05:28:25 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-27 05:28:25 +0400
commitf83a93e454e4a92d9619bc5bd16d73525e41ce46 (patch)
tree595264dbcf15b38e3f85c2238facea799fe28277 /source/blender/editors/mesh/editmesh_utils.c
parentae654301b041cae9cce8107614c1d17bae3ff12a (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.c12
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);