[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35553] trunk/blender/source/blender: bugfix [#26505] zoom in selected keys on graph editor
Campbell Barton
ideasman42 at gmail.com
Tue Mar 15 04:02:13 CET 2011
Revision: 35553
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35553
Author: campbellbarton
Date: 2011-03-15 03:02:12 +0000 (Tue, 15 Mar 2011)
Log Message:
-----------
bugfix [#26505] zoom in selected keys on graph editor
measure uv vertex distance in screen pixels rather then image.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/rct.c
trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
Modified: trunk/blender/source/blender/blenlib/intern/rct.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/rct.c 2011-03-15 01:48:01 UTC (rev 35552)
+++ trunk/blender/source/blender/blenlib/intern/rct.c 2011-03-15 03:02:12 UTC (rev 35553)
@@ -241,10 +241,10 @@
void print_rctf(const char *str, rctf *rect)
{
- printf("%s: xmin %.3f, xmax %.3f, ymin %.3f, ymax %.3f\n", str, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
+ printf("%s: xmin %.3f, xmax %.3f, ymin %.3f, ymax %.3f (%.3fx%.3f)\n", str, rect->xmin, rect->xmax, rect->ymin, rect->xmax, rect->xmax - rect->xmin, rect->ymax - rect->ymin);
}
void print_rcti(const char *str, rcti *rect)
{
- printf("%s: xmin %d, xmax %d, ymin %d, ymax %d\n", str, rect->xmin, rect->xmax, rect->ymin, rect->ymax);
+ printf("%s: xmin %d, xmax %d, ymin %d, ymax %d (%dx%d)\n", str, rect->xmin, rect->xmax, rect->ymin, rect->ymax, rect->xmax - rect->xmin, rect->ymax - rect->ymin);
}
Modified: trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
===================================================================
--- trunk/blender/source/blender/editors/uvedit/uvedit_ops.c 2011-03-15 01:48:01 UTC (rev 35552)
+++ trunk/blender/source/blender/editors/uvedit/uvedit_ops.c 2011-03-15 03:02:12 UTC (rev 35553)
@@ -1460,7 +1460,13 @@
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);
More information about the Bf-blender-cvs
mailing list