[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38559] trunk/blender/source/blender/ editors/space_image/image_ops.c: Corrected View Selected operator for image editor so now it works
Sergey Sharybin
g.ulairi at gmail.com
Thu Jul 21 11:50:39 CEST 2011
Revision: 38559
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38559
Author: nazgul
Date: 2011-07-21 09:50:39 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
Corrected View Selected operator for image editor so now it works
fine for images with different X and Y aspect ratio.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_image/image_ops.c
Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c 2011-07-21 09:47:33 UTC (rev 38558)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c 2011-07-21 09:50:39 UTC (rev 38559)
@@ -500,7 +500,7 @@
Scene *scene;
Object *obedit;
Image *ima;
- float size, min[2], max[2], d[2];
+ float size, min[2], max[2], d[2], aspx, aspy;
int width, height;
/* retrieve state */
@@ -511,7 +511,11 @@
ima= ED_space_image(sima);
ED_space_image_size(sima, &width, &height);
+ ED_image_aspect(ima, &aspx, &aspy);
+ width= width*aspx;
+ height= height*aspy;
+
/* get bounds */
if(!ED_uvedit_minmax(scene, ima, obedit, min, max))
return OPERATOR_CANCELLED;
More information about the Bf-blender-cvs
mailing list