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/tools/bmesh_beautify.c | |
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/tools/bmesh_beautify.c')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_beautify.c | 12 |
1 files changed, 8 insertions, 4 deletions
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); + } } } |