Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2020-09-15 11:08:47 +0300
committerJeroen Bakker <jeroen@blender.org>2020-09-15 12:02:18 +0300
commit6c2c89611c5dfc281861eb03fcb877c794dd4560 (patch)
tree65eca88d5df9ca974cf352ab88bdeb24ac398532 /source/blender/editors/space_image
parentd8a7d9deebb376ff909f316054999d57ca17da2d (diff)
Fix T80775: Image Editor Show Metadata Not Working
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/space_image.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index f1becd5f027..5660320ae8a 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -670,6 +670,27 @@ static void image_main_region_draw(const bContext *C, ARegion *region)
DRW_draw_view(C);
draw_image_main_helpers(C, region);
+ /* Draw Meta data of the image isn't added to the DrawManager as it is
+ * used in other areas as well. */
+ if (sima->flag & SI_DRAW_METADATA) {
+ Image *ima = ED_space_image(sima);
+ if (ima != NULL) {
+ int x, y;
+ rctf frame;
+ float zoomx, zoomy;
+ void *lock;
+
+ ED_space_image_get_zoom(sima, region, &zoomx, &zoomy);
+ ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
+
+ BLI_rctf_init(&frame, 0.0f, ibuf->x, 0.0f, ibuf->y);
+ UI_view2d_view_to_region(&region->v2d, 0.0f, 0.0f, &x, &y);
+
+ ED_region_image_metadata_draw(x, y, ibuf, &frame, zoomx, zoomy);
+ ED_space_image_release_buffer(sima, ibuf, lock);
+ }
+ }
+
/* sample line */
UI_view2d_view_ortho(v2d);
draw_image_sample_line(sima);