diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-09 18:33:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-09 18:34:28 +0300 |
commit | 491839b3c8b1eb3a98ddce1ddf76e75176124557 (patch) | |
tree | bd96660fbc9e003b313c1d2f4f775f049c553479 /source/blender/editors/space_image/image_draw.c | |
parent | 781db5f8a6582eb46724c7e568ef72c045ae755d (diff) |
Fix T42857: Inconsistency between cache line visibility and ability to change frame from image space
Diffstat (limited to 'source/blender/editors/space_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index f41e237beb4..7c5aa349fa0 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -854,8 +854,13 @@ void draw_image_main(const bContext *C, ARegion *ar) draw_render_info(sima->iuser.scene, ima, ar, zoomx, zoomy); } -static bool show_image_cache(Image *image, Mask *mask) +bool ED_space_image_show_cache(SpaceImage *sima) { + Image *image = ED_space_image(sima); + Mask *mask = NULL; + if (sima->mode == SI_MODE_MASK) { + mask = ED_space_image_get_mask(sima); + } if (image == NULL && mask == NULL) { return false; } @@ -873,12 +878,12 @@ void draw_image_cache(const bContext *C, ARegion *ar) float x, cfra = CFRA, sfra = SFRA, efra = EFRA, framelen = ar->winx / (efra - sfra + 1); Mask *mask = NULL; - if (sima->mode == SI_MODE_MASK) { - mask = ED_space_image_get_mask(sima); + if (!ED_space_image_show_cache(sima)) { + return; } - if (!show_image_cache(image, mask)) { - return; + if (sima->mode == SI_MODE_MASK) { + mask = ED_space_image_get_mask(sima); } glEnable(GL_BLEND); |