Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-15 06:02:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-15 06:02:12 +0300
commited0167175bc7eb207823539a67272584886c6c27 (patch)
tree111c64b1a2ba605f761986eaf9762369d06b42df /source/blender/editors/uvedit
parentfe529d43fec0cd225d0cf5c90f8099adadfc6710 (diff)
bugfix [#26505] zoom in selected keys on graph editor
measure uv vertex distance in screen pixels rather then image.
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 62ebee4ccfa..682015e3c52 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1460,7 +1460,13 @@ static int mouse_select(bContext *C, float co[2], int extend, int loop)
int a, i, select = 1, selectmode, sticky, sync, hitv[4], nvert;
int flush = 0; /* 0 == dont flush, 1 == sel, -1 == desel; only use when selection sync is enabled */
float limit[2], *hituv[4], penalty[2];
-
+
+ /* notice 'limit' is the same no matter the zoom level, since this is like
+ * remove doubles and could annoying if it joined points when zoomed out.
+ * 'penalty' is in screen pixel space otherwise zooming in on a uv-vert and
+ * shift-selecting can consider an adjacent point close enough to add to
+ * the selection rather then de-selecting the closest. */
+
uvedit_pixel_to_float(sima, limit, 0.05f);
uvedit_pixel_to_float(sima, penalty, 5.0f);