diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-06-07 13:35:20 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-06-07 13:35:20 +0400 |
commit | 3cd3cc892faa864cde4171b1752679bfb062066b (patch) | |
tree | 446aa627672cb94ebca2547dbf3bdb8d219cab69 /source | |
parent | 617a08162f174dad7a57d5370d081e76f4aff378 (diff) |
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
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 27ca345e132..181fb0f0aac 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4858,8 +4858,8 @@ void initEdgeSlide(TransInfo *t) 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 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2])) 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 @@ int EdgeSlide(TransInfo *t, const int UNUSED(mval[2])) 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); |