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/transform/transform_convert_mesh_uv.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/transform/transform_convert_mesh_uv.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_mesh_uv.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_convert_mesh_uv.c b/source/blender/editors/transform/transform_convert_mesh_uv.c index 56fa2d90fb2..f3e7446b2c4 100644 --- a/source/blender/editors/transform/transform_convert_mesh_uv.c +++ b/source/blender/editors/transform/transform_convert_mesh_uv.c @@ -178,9 +178,6 @@ static void uv_set_connectivity_distance(BMesh *bm, float *dists, const float as continue; } - float connected_uv[2]; - float uvdiff[2]; - bool other_vert_sel, connected_vert_sel; other_vert_sel = luv_other->flag & MLOOPUV_VERTSEL; @@ -196,16 +193,12 @@ static void uv_set_connectivity_distance(BMesh *bm, float *dists, const float as MLoopUV *luv_connected = BM_ELEM_CD_GET_VOID_P(l_connected, cd_loop_uv_offset); connected_vert_sel = luv_connected->flag & MLOOPUV_VERTSEL; - copy_v2_v2(connected_uv, luv_connected->uv); - mul_v2_v2(connected_uv, aspect); - sub_v2_v2v2(uvdiff, connected_uv, other_uv); /* Check if this loop is connected in UV space. * If the uv loops share the same selection state (if not, they are not connected as * they have been ripped or other edit commands have separated them). */ bool connected = other_vert_sel == connected_vert_sel && - fabsf(uvdiff[0]) < STD_UV_CONNECT_LIMIT && - fabsf(uvdiff[1]) < STD_UV_CONNECT_LIMIT; + equals_v2v2(luv_other->uv, luv_connected->uv); if (!connected) { continue; } |