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-05 05:53:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-05 05:53:30 +0400
commit4b940364a1dee78acdfe1ec319b35bb812faee29 (patch)
tree3097b5de3402f23260fcddaeffb02e6752654257 /source/blender/bmesh/operators/bmo_dissolve.c
parent4d84e869a0fd540247a99edbfeca24ffb75644cd (diff)
edge rotate now keeps edge properties (like seam, crease, bevel weight.. etc)
Diffstat (limited to 'source/blender/bmesh/operators/bmo_dissolve.c')
-rw-r--r--source/blender/bmesh/operators/bmo_dissolve.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c
index 9e07cb177dd..25eaab1740d 100644
--- a/source/blender/bmesh/operators/bmo_dissolve.c
+++ b/source/blender/bmesh/operators/bmo_dissolve.c
@@ -144,7 +144,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");
@@ -198,17 +198,16 @@ void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
BMVert *v, **verts = NULL;
BLI_array_declare(verts);
BMEdge *e;
- /* BMFace *f; */
+ BMFace *fa, *fb;
int i;
+
BMO_ITER(e, &oiter, bm, op, "edges", BM_EDGE) {
- if (BM_edge_face_count(e) == 2) {
+ if (BM_edge_face_pair(e, &fa, &fb)) {
BMO_elem_flag_enable(bm, e->v1, VERT_MARK);
BMO_elem_flag_enable(bm, e->v2, VERT_MARK);
- BM_faces_join_pair(bm, e->l->f,
- e->l->radial_next->f,
- e);
+ BM_faces_join_pair(bm, fa, fb, e, TRUE);
}
}
@@ -256,13 +255,12 @@ void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
}
BMO_ITER(e, &eiter, bm, op, "edges", BM_EDGE) {
- const int edge_face_count = BM_edge_face_count(e);
- if (edge_face_count == 2) {
+ BMFace *fa, *fb;
+
+ if (BM_edge_face_pair(e, &fa, &fb)) {
/* join faces */
- BM_faces_join_pair(bm, e->l->f,
- e->l->radial_next->f,
- e);
+ BM_faces_join_pair(bm, fa, fb, e, TRUE);
}
}
@@ -517,7 +515,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
if (BM_edge_face_angle(bm, 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 dont mind, just move on */
if (nf == NULL) {