diff options
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 9cd34c46874..4c205818329 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -2127,16 +2127,16 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc { /* add uv under mouse to processed uv's */ float co[2]; - NearestHit hit; + UvNearestHit hit = UV_NEAREST_HIT_INIT; ARegion *ar = CTX_wm_region(C); Image *ima = CTX_data_edit_image(C); UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); if (state->mode == STITCH_VERT) { - uv_find_nearest_vert(scene, ima, state->obedit, state->em, co, NULL, &hit); - - if (hit.efa) { + if (uv_find_nearest_vert( + scene, ima, state->obedit, co, 0.0f, &hit)) + { /* Add vertex to selection, deselect all common uv's of vert other * than selected and update the preview. This behavior was decided so that * you can do stuff like deselect the opposite stitchable vertex and the initial still gets deselected */ @@ -2148,9 +2148,9 @@ static void stitch_select(bContext *C, Scene *scene, const wmEvent *event, Stitc } } else { - uv_find_nearest_edge(scene, ima, state->obedit, state->em, co, &hit); - - if (hit.efa) { + if (uv_find_nearest_edge( + scene, ima, state->obedit, co, &hit)) + { UvEdge *edge = uv_edge_get(hit.l, state); stitch_select_edge(edge, state, false); } |