change transform to round at 0.5 for fcurves.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 20 May 2011 18:19:29 +0000 (18:19 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 20 May 2011 18:19:29 +0000 (18:19 +0000)
this gave noticeable issue when transforming int/fcurve's below zero.

source/blender/editors/transform/transform_conversions.c

index 8d37b7aeabb807ab9c1f56a4a0bb03a282b142f9..5fbb3f07c5b16b67407949612262005481434c2d 100644 (file)
@@ -3699,7 +3699,7 @@ void flushTransGraphData(TransInfo *t)
                
                /* if int-values only, truncate to integers */
                if (td->flag & TD_INTVALUES)
-                       td2d->loc2d[1]= (float)((int)td2d->loc[1]);
+                       td2d->loc2d[1]= floorf(td2d->loc[1] + 0.5f);
                else
                        td2d->loc2d[1]= td2d->loc[1];