diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-24 11:24:11 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-24 11:24:11 +0400 |
commit | 2de2acc6819f7024f06a9dcdc4cc2346a1dd57f7 (patch) | |
tree | 3cf708af945985531baacb0268d86d268d81093a /source/blender/modifiers/intern/MOD_edgesplit.c | |
parent | 879d92062a703b9d7bd718432a37dc8e7dd4a9bc (diff) |
add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_edgesplit.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_edgesplit.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index b1c3459bf51..be24f73502e 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -43,9 +43,10 @@ #include "BKE_cdderivedmesh.h" #include "BKE_modifier.h" -#include "BKE_tessmesh.h" #include "BKE_mesh.h" +#include "bmesh.h" + #include "DNA_object_types.h" /* EdgeSplit */ @@ -61,13 +62,11 @@ static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Obj { DerivedMesh *result; BMesh *bm; - BMEditMesh *em; BMIter iter; BMEdge *e; float threshold = cosf((emd->split_angle + 0.00001f) * (float)M_PI / 180.0f); - em = DM_to_editbmesh(dm, NULL, FALSE); - bm = em->bm; + bm = DM_to_bmesh(dm); BM_mesh_normals_update(bm, FALSE); BMO_push(bm, NULL); @@ -110,10 +109,8 @@ static DerivedMesh *doEdgeSplit(DerivedMesh *dm, EdgeSplitModifierData *emd, Obj /* BM_mesh_validate(bm); */ /* for troubleshooting */ - BLI_assert(em->looptris == NULL); - result = CDDM_from_BMEditMesh(em, NULL, TRUE, FALSE); - BMEdit_Free(em); - MEM_freeN(em); + result = CDDM_from_bmesh(bm, TRUE); + BM_mesh_free(bm); return result; } |