Revision: 26293
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26293
Author: blendix
Date: 2010-01-26 12:36:48 +0100 (Tue, 26 Jan 2010)
Log Message:
-----------
Patch #20800: uv editor zoom rate not properly calculated,
uv's were drawn slightly offset from the image. Patch by
Masahito Takahashi, thanks!
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_image/space_image.c
Modified: trunk/blender/source/blender/editors/space_image/space_image.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/space_image.c
2010-01-26 11:29:39 UTC (rev 26292)
+++ trunk/blender/source/blender/editors/space_image/space_image.c
2010-01-26 11:36:48 UTC (rev 26293)
@@ -218,8 +218,8 @@
ED_space_image_size(sima, &width, &height);
- *zoomx= (float)(ar->winrct.xmax -
ar->winrct.xmin)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width);
- *zoomy= (float)(ar->winrct.ymax -
ar->winrct.ymin)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height);
+ *zoomx= (float)(ar->winrct.xmax - ar->winrct.xmin +
1)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width);
+ *zoomy= (float)(ar->winrct.ymax - ar->winrct.ymin +
1)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height);
}
void ED_space_image_uv_aspect(SpaceImage *sima, float *aspx, float *aspy)
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs