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>2013-02-09 19:49:20 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-09 19:49:20 +0400
commit555bcc3298a564cb678c9f31ba6bded86d58bab6 (patch)
tree93d7a5eb7982f43047419f57c7df4a29c1395d15 /source/blender/bmesh/operators/bmo_triangulate.c
parentfd145b4df19c70b3133c45b364c58a14d2cf818d (diff)
add beauty option for triangle fill since you might want to use the initial scanfill result.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_triangulate.c')
-rw-r--r--source/blender/bmesh/operators/bmo_triangulate.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c
index 563fccf879d..3d78ff64876 100644
--- a/source/blender/bmesh/operators/bmo_triangulate.c
+++ b/source/blender/bmesh/operators/bmo_triangulate.c
@@ -149,9 +149,9 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op)
void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
{
+ const bool use_beauty = BMO_slot_bool_get(op->slots_in, "use_beauty");
BMOIter siter;
BMEdge *e;
- BMOperator bmop;
ScanFillContext sf_ctx;
/* ScanFillEdge *sf_edge; */ /* UNUSED */
ScanFillVert *sf_vert, *sf_vert_1, *sf_vert_2;
@@ -203,11 +203,14 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
BLI_scanfill_end(&sf_ctx);
BLI_smallhash_release(&hash);
- /* clean up fill */
- BMO_op_initf(bm, &bmop, op->flag, "beautify_fill faces=%ff edges=%Fe", ELE_NEW, EDGE_MARK);
- BMO_op_exec(bm, &bmop);
- BMO_slot_buffer_flag_enable(bm, bmop.slots_out, "geom.out", BM_FACE | BM_EDGE, ELE_NEW);
- BMO_op_finish(bm, &bmop);
+ if (use_beauty) {
+ BMOperator bmop;
+
+ BMO_op_initf(bm, &bmop, op->flag, "beautify_fill faces=%ff edges=%Fe", ELE_NEW, EDGE_MARK);
+ BMO_op_exec(bm, &bmop);
+ BMO_slot_buffer_flag_enable(bm, bmop.slots_out, "geom.out", BM_FACE | BM_EDGE, ELE_NEW);
+ BMO_op_finish(bm, &bmop);
+ }
BMO_slot_buffer_from_enabled_flag(bm, op, op->slots_out, "geom.out", BM_EDGE | BM_FACE, ELE_NEW);
}