Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-04-01 17:35:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-04-01 17:35:52 +0400
commit82e816eb1a8a37a9905c7a73da4555cc160c575b (patch)
treeb433c09a78d30631a222b81b0d10f66d6838900f /source/blender/src/drawimage.c
parent7d6e7c716fcea69cacb74132efbae27133345f57 (diff)
added a sloppy option for getting the active face, which returns the last selected if none is active, made the uv calculation aspect correction use the active faces image rather then the last used image viewports.
Diffstat (limited to 'source/blender/src/drawimage.c')
-rw-r--r--source/blender/src/drawimage.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c
index d7b7d81b0c0..9f5d538768d 100644
--- a/source/blender/src/drawimage.c
+++ b/source/blender/src/drawimage.c
@@ -194,7 +194,7 @@ void calc_image_view(SpaceImage *sima, char mode)
ImBuf *ibuf= imagewindow_get_ibuf(sima);
float xuser_asp, yuser_asp;
- aspect_sima(sima, &xuser_asp, &yuser_asp);
+ image_pixel_aspect(sima->image, &xuser_asp, &yuser_asp);
if(ibuf) {
xim= ibuf->x * xuser_asp;
yim= ibuf->y * yuser_asp;
@@ -2045,7 +2045,7 @@ void drawimagespace(ScrArea *sa, void *spacedata)
unsigned int *rect;
float x1, y1;
short sx, sy, dx, dy, show_render= 0, show_viewer= 0;
- float xuser_asp, yuser_asp;
+ float xuser_asp=1, yuser_asp=1;
/* If derived data is used then make sure that object
* is up-to-date... might not be the case because updates
* are normally done in drawview and could get here before
@@ -2070,9 +2070,8 @@ void drawimagespace(ScrArea *sa, void *spacedata)
what_image(sima);
- aspect_sima(sima, &xuser_asp, &yuser_asp);
-
if(sima->image) {
+ image_pixel_aspect(sima->image, &xuser_asp, &yuser_asp);
/* UGLY hack? until now iusers worked fine... but for flipbook viewer we need this */
if(sima->image->type==IMA_TYPE_COMPOSITE) {