From 246efd7286f6187e4dd4b3edcc79cccb1746bb1d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 9 Jan 2021 18:27:25 +1100 Subject: Fix UV selection threshold which ignored image aspect and zoom level Selecting UVs wasn't properly scaling based on the zoom or image aspect. This now matches vertex selection in the 3D view. --- source/blender/editors/sculpt_paint/sculpt_uv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index f77d473ae57..219a8303674 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -543,7 +543,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm /* we need to find the active island here */ if (do_island_optimization) { UvElement *element; - UvNearestHit hit = UV_NEAREST_HIT_INIT; + UvNearestHit hit = UV_NEAREST_HIT_INIT_MAX(®ion->v2d); uv_find_nearest_vert(scene, obedit, co, 0.0f, &hit); element = BM_uv_element_get(data->elementMap, hit.efa, hit.l); -- cgit v1.2.3