diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-16 22:24:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-02-16 22:24:04 +0300 |
commit | ad01c90ee3942fb2a4a792f0454a136b441f42b4 (patch) | |
tree | f0468981d9f46ae32b386d36ab34d1d9bbda9a2f /source/blender/editors/space_image/image_draw.c | |
parent | a4c010975a6afaecc2ca8f8284de3febda113369 (diff) |
Revert render slots commit for release, I can't find the bug or even redo
it myself, there will still be render slots just old implementation.
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index bc07222c9fb..cb942472b9e 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -64,8 +64,6 @@ #include "WM_api.h" -#include "RE_pipeline.h" - #include "image_intern.h" #define HEADER_HEIGHT 18 @@ -92,35 +90,37 @@ static void image_verify_buffer_float(SpaceImage *sima, Image *ima, ImBuf *ibuf, } } -static void draw_render_info(Scene *scene, Image *ima, ARegion *ar) +static void draw_render_info(Image *ima, ARegion *ar) { - RenderResult *rr; rcti rect; float colf[3]; + int showspare= 0; // XXX BIF_show_render_spare(); - rr= BKE_image_acquire_renderresult(scene, ima); - - if(rr->text) { - rect= ar->winrct; - rect.xmin= 0; - rect.ymin= ar->winrct.ymax - ar->winrct.ymin - HEADER_HEIGHT; - rect.xmax= ar->winrct.xmax - ar->winrct.xmin; - rect.ymax= ar->winrct.ymax - ar->winrct.ymin; - - /* clear header rect */ - UI_GetThemeColor3fv(TH_BACK, colf); - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); - glColor4f(colf[0]+0.1f, colf[1]+0.1f, colf[2]+0.1f, 0.5f); - glRecti(rect.xmin, rect.ymin, rect.xmax, rect.ymax+1); - glDisable(GL_BLEND); - - UI_ThemeColor(TH_TEXT_HI); + if(ima->render_text==NULL) + return; + + rect= ar->winrct; + rect.xmin= 0; + rect.ymin= ar->winrct.ymax - ar->winrct.ymin - HEADER_HEIGHT; + rect.xmax= ar->winrct.xmax - ar->winrct.xmin; + rect.ymax= ar->winrct.ymax - ar->winrct.ymin; + + /* clear header rect */ + UI_GetThemeColor3fv(TH_BACK, colf); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glColor4f(colf[0]+0.1f, colf[1]+0.1f, colf[2]+0.1f, 0.5f); + glRecti(rect.xmin, rect.ymin, rect.xmax, rect.ymax+1); + glDisable(GL_BLEND); + + UI_ThemeColor(TH_TEXT_HI); - UI_DrawString(12, rect.ymin + 5, rr->text); + if(showspare) { + UI_DrawString(12, rect.ymin + 5, "(Previous)"); + UI_DrawString(72, rect.ymin + 5, ima->render_text); } - - BKE_image_release_renderresult(scene, ima); + else + UI_DrawString(12, rect.ymin + 5, ima->render_text); } void draw_image_info(ARegion *ar, int channels, int x, int y, char *cp, float *fp, int *zp, float *zpf) @@ -654,7 +654,7 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) /* render info */ if(ibuf && ima && show_render) - draw_render_info(scene, ima, ar); + draw_render_info(ima, ar); /* XXX integrate this code */ #if 0 |