diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-30 15:39:14 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-04-30 15:40:02 +0400 |
commit | 3803c646d8e8277d4d51473b03ac3153646a3493 (patch) | |
tree | 8404e6cb8862611f84abe3c8d7dd9463d40fe6cd | |
parent | 1760763beca523d0cd1860fbb091bc4206f518b0 (diff) |
Changes to cache line display in image editor
Only show it when having active mask or when current image
is a sequence or movie.
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 4e1b60123a6..635c7cde584 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -888,6 +888,17 @@ 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) +{ + if (image == NULL && mask == NULL) { + return false; + } + if (mask == NULL) { + return ELEM(image->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE); + } + return true; +} + void draw_image_cache(const bContext *C, ARegion *ar) { SpaceImage *sima = CTX_wm_space_image(C); @@ -900,7 +911,7 @@ void draw_image_cache(const bContext *C, ARegion *ar) mask = ED_space_image_get_mask(sima); } - if (image == NULL && mask == NULL) { + if (!show_image_cache(image, mask)) { return; } |