diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-21 05:54:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-21 07:32:21 +0300 |
commit | b88dd3b8e7b9c02ae08d4679bb427963c5d21250 (patch) | |
tree | ca6555055dbddb41853bdf8270a6719dfa385556 /source/blender/editors/uvedit/uvedit_ops.c | |
parent | 50fe187443b8fdd9aa462e51bc49dcaa8f33b67a (diff) |
UV: remove selection threshold for nearby coordinates
Internally UV selection considered close UV's to be connected.
While this could be convenient in some cases,
it complicates logic for more advanced selection operations that
need to check when UV's should be considered part of the same vertex
since simple threshold checks would give different results depending
on the order of UV's tested.
Users must now run "Merge by Distance" instead of relying
on this selection threshold.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_ops.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index faf8e5013dd..e2368ae6ba8 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -1843,7 +1843,6 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); - const float limit[2] = {STD_UV_CONNECT_LIMIT, STD_UV_CONNECT_LIMIT}; const bool mark_seams = RNA_boolean_get(op->ptr, "mark_seams"); const bool mark_sharp = RNA_boolean_get(op->ptr, "mark_sharp"); bool changed_multi = false; @@ -1884,23 +1883,10 @@ static int uv_seams_from_islands_exec(bContext *C, wmOperator *op) continue; } - const MLoopUV *luv_curr = BM_ELEM_CD_GET_VOID_P(l_iter, cd_loop_uv_offset); - const MLoopUV *luv_next = BM_ELEM_CD_GET_VOID_P(l_iter->next, cd_loop_uv_offset); - bool mark = false; BMLoop *l_other = l_iter->radial_next; do { - const MLoopUV *luv_other_curr = BM_ELEM_CD_GET_VOID_P(l_other, cd_loop_uv_offset); - const MLoopUV *luv_other_next = BM_ELEM_CD_GET_VOID_P(l_other->next, cd_loop_uv_offset); - if (l_iter->v != l_other->v) { - SWAP(const MLoopUV *, luv_other_curr, luv_other_next); - } - - if (!compare_ff(luv_curr->uv[0], luv_other_curr->uv[0], limit[0]) || - !compare_ff(luv_curr->uv[1], luv_other_curr->uv[1], limit[1]) || - - !compare_ff(luv_next->uv[0], luv_other_next->uv[0], limit[0]) || - !compare_ff(luv_next->uv[1], luv_other_next->uv[1], limit[1])) { + if (!BM_loop_uv_share_edge_check(l_iter, l_other, cd_loop_uv_offset)) { mark = true; break; } |