diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-10-20 06:39:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-10-20 06:39:15 +0300 |
commit | efc2edc47f7a6f0f81aba0ed326db17630255b98 (patch) | |
tree | eaf5a822818214cb30fbae01bd3bbc05b06fe098 /source | |
parent | c4668b72e073a66ac09aa02622b7d25f1339fcdb (diff) |
Fix T81190: Merge by Distance marks edges sharp
Make calculating edges sharp optional since it marks nearly all edges
sharp when the normals have been manually rotated.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index b9eac26eaa8..1ceeb3d1fed 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3349,6 +3349,8 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) { const float threshold = RNA_float_get(op->ptr, "threshold"); const bool use_unselected = RNA_boolean_get(op->ptr, "use_unselected"); + const bool use_sharp_edge_from_normals = RNA_boolean_get(op->ptr, "use_sharp_edge_from_normals"); + int count_multi = 0; ViewLayer *view_layer = CTX_data_view_layer(C); @@ -3409,7 +3411,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) BM_mesh_elem_hflag_enable_test(em->bm, htype_select, BM_ELEM_SELECT, true, true, BM_ELEM_TAG); EDBM_selectmode_flush(em); - BM_custom_loop_normals_from_vector_layer(em->bm, true); + BM_custom_loop_normals_from_vector_layer(em->bm, use_sharp_edge_from_normals); if (count) { count_multi += count; @@ -3451,6 +3453,12 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) false, "Unselected", "Merge selected to other unselected vertices"); + + RNA_def_boolean(ot->srna, + "use_sharp_edge_from_normals", + false, + "Sharp Edges", + "Calculate sharp edges using custom normal data (when available)"); } /** \} */ |