diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2013-10-16 07:24:50 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-10-16 07:24:50 +0400 |
commit | 859dfccb589a099e0b3032b52c3b528f5e1f2568 (patch) | |
tree | 3546f75bed7be6b659ae74032cbe9030dc3c958e /source/blender/bmesh | |
parent | fe93d4a3d848abd59a1de43a51142c3e2f3c961f (diff) |
beautify: passing edge/face flags as arguments
no functional change, just preparing the ground for the beautify in
triangulate modifier changes.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/operators/bmo_beautify.c | 2 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_beautify.c | 12 | ||||
-rw-r--r-- | source/blender/bmesh/tools/bmesh_beautify.h | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/bmesh/operators/bmo_beautify.c b/source/blender/bmesh/operators/bmo_beautify.c index b0b3e723603..d9ab30bfcfa 100644 --- a/source/blender/bmesh/operators/bmo_beautify.c +++ b/source/blender/bmesh/operators/bmo_beautify.c @@ -79,7 +79,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op) } bm->elem_index_dirty |= BM_EDGE; - BM_mesh_beautify_fill(bm, edge_array, edge_array_len, flag, method); + BM_mesh_beautify_fill(bm, edge_array, edge_array_len, flag, method, ELE_NEW, FACE_MARK | ELE_NEW); MEM_freeN(edge_array); diff --git a/source/blender/bmesh/tools/bmesh_beautify.c b/source/blender/bmesh/tools/bmesh_beautify.c index fa39d6bb05a..af9345b903c 100644 --- a/source/blender/bmesh/tools/bmesh_beautify.c +++ b/source/blender/bmesh/tools/bmesh_beautify.c @@ -357,7 +357,8 @@ static void bm_edge_update_beauty_cost(BMEdge *e, Heap *eheap, HeapNode **eheap_ * have their index values set according to their position in the array. */ void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len, - const short flag, const short method) + const short flag, const short method, + const short oflag_edge, const short oflag_face) { Heap *eheap; /* edge heap */ HeapNode **eheap_table; /* edge index aligned table pointing to the eheap */ @@ -416,9 +417,12 @@ void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_ bm_edge_update_beauty_cost(e, eheap, eheap_table, edge_state_arr, flag, method); /* update flags */ - BMO_elem_flag_enable(bm, e, ELE_NEW); - BMO_elem_flag_enable(bm, e->l->f, FACE_MARK | ELE_NEW); - BMO_elem_flag_enable(bm, e->l->radial_next->f, FACE_MARK | ELE_NEW); + if (oflag_edge) + BMO_elem_flag_enable(bm, e, oflag_edge); + if (oflag_face) { + BMO_elem_flag_enable(bm, e->l->f, oflag_face); + BMO_elem_flag_enable(bm, e->l->radial_next->f, oflag_face); + } } } diff --git a/source/blender/bmesh/tools/bmesh_beautify.h b/source/blender/bmesh/tools/bmesh_beautify.h index 0ce8ddee2b6..210e265d706 100644 --- a/source/blender/bmesh/tools/bmesh_beautify.h +++ b/source/blender/bmesh/tools/bmesh_beautify.h @@ -32,6 +32,7 @@ enum { }; void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len, - const short flag, const short method); + const short flag, const short method, + const short oflag_edge, const short oflag_face); #endif /* __BMESH_BEAUTIFY_H__ */ |