remove 'dissolve_edge_loop' bmesh operator, edgeloop dissolve replaces this now.

This commit is contained in:
Campbell Barton
2013-06-14 04:04:35 +00:00
parent 64d6810cd9
commit 6664d1bf59
3 changed files with 0 additions and 77 deletions

View File

@@ -895,23 +895,6 @@ static BMOpDefine bmo_dissolve_edges_def = {
BMO_OPTYPE_FLAG_UNTAN_MULTIRES | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
};
/*
* Dissolve Edge Loop.
*/
static BMOpDefine bmo_dissolve_edge_loop_def = {
"dissolve_edge_loop",
/* slots_in */
{{"edges", BMO_OP_SLOT_ELEMENT_BUF, {BM_EDGE}},
{{'\0'}},
},
/* slots_out */
{{"region.out", BMO_OP_SLOT_ELEMENT_BUF, {BM_FACE}},
{{'\0'}},
},
bmo_dissolve_edgeloop_exec,
BMO_OPTYPE_FLAG_UNTAN_MULTIRES | BMO_OPTYPE_FLAG_NORMALS_CALC | BMO_OPTYPE_FLAG_SELECT_FLUSH,
};
/*
* Dissolve Faces.
*/
@@ -1715,7 +1698,6 @@ const BMOpDefine *bmo_opdefines[] = {
&bmo_create_uvsphere_def,
&bmo_create_vert_def,
&bmo_delete_def,
&bmo_dissolve_edge_loop_def,
&bmo_dissolve_edges_def,
&bmo_dissolve_faces_def,
&bmo_dissolve_limit_def,

View File

@@ -51,7 +51,6 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op);
void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op);
void bmo_create_vert_exec(BMesh *bm, BMOperator *op);
void bmo_delete_exec(BMesh *bm, BMOperator *op);
void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op);
void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op);
void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op);
void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op);

View File

@@ -228,64 +228,6 @@ cleanup:
BLI_array_free(regions);
}
/* almost identical to dissolve edge, except it cleans up vertice */
void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op)
{
/* BMOperator fop; */
BMFace *act_face = bm->act_face;
BMOIter oiter;
BMIter iter;
BMVert *v, **verts = NULL;
BLI_array_declare(verts);
BMEdge *e;
int i;
BMO_ITER (e, &oiter, op->slots_in, "edges", BM_EDGE) {
BMFace *fa, *fb;
if (BM_edge_face_pair(e, &fa, &fb)) {
BMFace *f_new;
BMO_elem_flag_enable(bm, e->v1, VERT_MARK);
BMO_elem_flag_enable(bm, e->v2, VERT_MARK);
/* BMESH_TODO - check on delaying edge removal since we may end up removing more than
* one edge, and later reference a removed edge */
f_new = BM_faces_join_pair(bm, fa, fb, e, true);
if (f_new) {
/* maintain active face */
if (act_face && bm->act_face == NULL) {
bm->act_face = f_new;
}
}
}
}
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
if (BMO_elem_flag_test(bm, v, VERT_MARK) && BM_vert_edge_count(v) == 2) {
BLI_array_append(verts, v);
}
}
/* clean up extreneous 2-valence vertice */
for (i = 0; i < BLI_array_count(verts); i++) {
if (verts[i]->e) {
BM_vert_collapse_edge(bm, verts[i]->e, verts[i], true);
}
}
BLI_array_free(verts);
//BMO_op_initf(bm, &fop, "dissolve_faces faces=%ff", FACE_MARK);
//BMO_op_exec(bm, &fop);
//BMO_slot_copy(op, &fop, "region.out", "region.out");
//BMO_op_finish(bm, &fop);
}
void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op)
{
/* might want to make this an option or mode - campbell */