diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-06-12 16:25:46 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-06-12 16:26:23 +0300 |
commit | 7823ca06da0bd3d2c0eba83f9a98f5b1d1a6db7f (patch) | |
tree | 4ccc55138cb5ceb4007267c0be9ea144efcc6a6b /source/blender/editors/space_clip/clip_draw.c | |
parent | 4fae3620d0494ccc128c5e169c4a579449e28220 (diff) |
Support metadata display in clip editor
Diffstat (limited to 'source/blender/editors/space_clip/clip_draw.c')
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index ce248f1eb10..76954ede522 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -43,6 +43,7 @@ #include "BLI_math.h" #include "BLI_string.h" #include "BLI_math_base.h" +#include "BLI_rect.h" #include "BKE_context.h" #include "BKE_image.h" @@ -285,6 +286,7 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar, MovieClip *clip = ED_space_clip_get_clip(sc); int filter = GL_LINEAR; int x, y; + rctf frame; /* find window pixel coordinates of origin */ UI_view2d_view_to_region(&ar->v2d, 0.0f, 0.0f, &x, &y); @@ -308,10 +310,14 @@ static void draw_movieclip_buffer(const bContext *C, SpaceClip *sc, ARegion *ar, glPixelZoom(zoomx * width / ibuf->x, zoomy * height / ibuf->y); glaDrawImBuf_glsl_ctx(C, ibuf, x, y, filter); - /* reset zoom */ glPixelZoom(1.0f, 1.0f); + BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y); + + if (sc->flag & SC_SHOW_METADATA) + ED_region_image_metadata_draw(x, y, ibuf, frame, zoomx * width / ibuf->x, zoomy * height / ibuf->y); + if (ibuf->planes == 32) glDisable(GL_BLEND); } |