From c6491074992e939d1c2838a133e340b12a230afe Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 3 Feb 2013 08:07:14 +0000 Subject: [PATCH] when triangulating ngons, use beauty option to rotate edges. gives much nicer results and means you can preserve original edges without triangulating ngons one at a time --- source/blender/bmesh/operators/bmo_triangulate.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index c4d15034c0f..bbcb07e1174 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -50,6 +50,12 @@ void bmo_triangulate_exec(BMesh *bm, BMOperator *op) BM_mesh_triangulate(bm, use_beauty, true); + if (use_beauty) { + BMO_op_callf(bm, op->flag, + "beautify_fill faces=%hf constrain_edges=%He", + BM_ELEM_TAG, BM_ELEM_TAG); + } + BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "edges.out", BM_EDGE, BM_ELEM_TAG); BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG); }