[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37294] trunk/blender/source/blender/ editors/transform/transform.c: fix for edge slide snapping values being incorrect ( reported by Nether Hound).

Campbell Barton ideasman42 at gmail.com
Tue Jun 7 11:35:20 CEST 2011


Revision: 37294
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37294
Author:   campbellbarton
Date:     2011-06-07 09:35:20 +0000 (Tue, 07 Jun 2011)
Log Message:
-----------
fix for edge slide snapping values being incorrect (reported by Nether Hound).
Also dont call the value a 'Percent' and clamp the range displayed in the header.
snap range being 

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform.c

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2011-06-07 08:47:33 UTC (rev 37293)
+++ trunk/blender/source/blender/editors/transform/transform.c	2011-06-07 09:35:20 UTC (rev 37294)
@@ -4858,8 +4858,8 @@
 	t->idx_max = 0;
 	t->num.idx_max = 0;
 	t->snap[0] = 0.0f;
-	t->snap[1] = (float)((5.0/180)*M_PI);
-	t->snap[2] = t->snap[1] * 0.2f;
+	t->snap[1] = 0.1f;
+	t->snap[2] = t->snap[1] * 0.1f;
 
 	t->num.increment = t->snap[1];
 
@@ -4985,6 +4985,9 @@
 
 	snapGrid(t, &final);
 
+	/* only do this so out of range values are not displayed */
+	CLAMP(final, -1.0f, 1.0f);
+
 	if (hasNumInput(&t->num)) {
 		char c[20];
 
@@ -4992,10 +4995,10 @@
 
 		outputNumInput(&(t->num), c);
 
-		sprintf(str, "Edge Slide Percent: %s", &c[0]);
+		sprintf(str, "Edge Slide: %s", &c[0]);
 	}
 	else {
-		sprintf(str, "Edge Slide Percent: %.2f", final);
+		sprintf(str, "Edge Slide: %.2f", final);
 	}
 
 	CLAMP(final, -1.0f, 1.0f);




More information about the Bf-blender-cvs mailing list