diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-29 02:41:34 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-29 02:41:34 +0300 |
commit | cb499c9df4dd1983f74810024119dc204075c0db (patch) | |
tree | ba8dd31f520d09cc43585eca8528d13eabd1d3dc /source/blender/editors/space_image/image_draw.c | |
parent | 21b7556bf757bdae0e0f2af3437f57345358aa9f (diff) |
* Partially converted constraint template to layout engine
* Removed old code
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 58 |
1 files changed, 6 insertions, 52 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 1b801060a23..6e883405ef8 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -68,47 +68,6 @@ #define HEADER_HEIGHT 18 -#if 0 -static int image_preview_active(SpaceImage *sima, Scene *scene, float *xim, float *yim) -{ - /* only when compositor shows, and image handler set */ - if(sima->image && sima->image->type==IMA_TYPE_COMPOSITE) { - /* XXX panels .. */ -#if 0 - short a; - - for(a=0; a<SPACE_MAXHANDLER; a+=2) { - if(sima->blockhandler[a] == IMAGE_HANDLER_PREVIEW) { - if(xim) *xim= (scene->r.size*scene->r.xsch)/100; - if(yim) *yim= (scene->r.size*scene->r.ysch)/100; - return 1; - } - } -#endif - } - return 0; -} -#endif - -/* are there curves? curves visible? and curves do something? */ -static int image_curves_active(SpaceImage *sima) -{ - if(sima->cumap) { - if(curvemapping_RGBA_does_something(sima->cumap)) { - /* XXX panels .. */ -#if 0 - short a; - for(a=0; a<SPACE_MAXHANDLER; a+=2) { - if(sima->blockhandler[a] == IMAGE_HANDLER_CURVES) - return 1; - } -#endif - } - } - - return 0; -} - static void image_verify_buffer_float(SpaceImage *sima, Image *ima, ImBuf *ibuf, int color_manage) { /* detect if we need to redo the curve map. @@ -120,18 +79,13 @@ static void image_verify_buffer_float(SpaceImage *sima, Image *ima, ImBuf *ibuf, if(ibuf->rect_float) { if(ibuf->rect==NULL) { - if(image_curves_active(sima)) { - curvemapping_do_ibuf(sima->cumap, ibuf); - } - else { - if (color_manage) { - if (ima && ima->source == IMA_SRC_VIEWER) - ibuf->profile = IB_PROFILE_LINEAR_RGB; - } else { - ibuf->profile = IB_PROFILE_NONE; - } - IMB_rect_from_float(ibuf); + if (color_manage) { + if (ima && ima->source == IMA_SRC_VIEWER) + ibuf->profile = IB_PROFILE_LINEAR_RGB; + } else { + ibuf->profile = IB_PROFILE_NONE; } + IMB_rect_from_float(ibuf); } } } |