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-04-04 18:48:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-04 18:48:10 +0400
commit1635d8e873eff8d49e7871047ca8b5c026cdf214 (patch)
tree44f23419857f60e19cd0cdffb3ce42491db01d6f /source/blender/bmesh/operators/bmo_dissolve.c
parentc93c8bda3de90bb516f45b34531f07a8365a65d1 (diff)
add option not to delete edges/verts when joining faces, needed so we can loop over edges and join them without having to check if they have been removed.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_dissolve.c')
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index 40650f45fed..167556a158c 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -147,7 +147,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op)
while (faces[tot])
tot++;
- f = BM_faces_join(bm, faces, tot);
+ f = BM_faces_join(bm, faces, tot, TRUE);
if (!f) {
BMO_error_raise(bm, op, BMERR_DISSOLVEFACES_FAILED,
"Could not create merged face");
@@ -210,7 +210,9 @@ void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
BMO_elem_flag_enable(bm, e->v1, VERT_MARK);
BMO_elem_flag_enable(bm, e->v2, VERT_MARK);
- BM_faces_join_pair(bm, fa, fb, e);
+ /* BMESH_TODO - check on delaying edge removal since we may end up removing more then
+ * one edge, and later referene a removed edge */
+ BM_faces_join_pair(bm, fa, fb, e, TRUE);
}
}
@@ -263,7 +265,10 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
if (BM_edge_face_pair(e, &fa, &fb)) {
/* join faces */
- BM_faces_join_pair(bm, fa, fb, e);
+
+ /* BMESH_TODO - check on delaying edge removal since we may end up removing more then
+ * one edge, and later referene a removed edge */
+ BM_faces_join_pair(bm, fa, fb, e, TRUE);
}
}
@@ -519,7 +524,8 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
if (BM_edge_face_angle(e) < angle_limit) {
BMFace *nf = BM_faces_join_pair(bm, e->l->f,
e->l->radial_next->f,
- e); /* join faces */
+ e,
+ TRUE); /* join faces */
/* there may be some errors, we don't mind, just move on */
if (nf == NULL) {