Merging r50573 through r50575 from trunk soc-2011-tomato

This commit is contained in:
Sergey Sharybin
2012-09-13 13:53:58 +00:00
parent f631ae9f46
commit ad15c19ab9

View File

@@ -230,13 +230,19 @@ void ED_space_image_get_uv_aspect(SpaceImage *sima, float *aspx, float *aspy)
void ED_image_get_uv_aspect(Image *ima, ImageUser *iuser, float *aspx, float *aspy)
{
int w, h;
if (ima) {
int w, h;
BKE_image_get_aspect(ima, aspx, aspy);
BKE_image_get_size(ima, iuser, &w, &h);
BKE_image_get_aspect(ima, aspx, aspy);
BKE_image_get_size(ima, iuser, &w, &h);
*aspx *= (float)w;
*aspy *= (float)h;
*aspx *= (float)w;
*aspy *= (float)h;
}
else {
*aspx = 1.0f;
*aspy = 1.0f;
}
}
/* takes event->mval */