Show metadata for rendered images

Previously metadata was only shown for images which are saved
to disk.

This change makes it so that it's possible to see metadata right
after pressing F12.
This commit is contained in:
Sergey Sharybin 2019-03-04 11:29:55 +01:00
parent 2150a68a80
commit e90a2807bf
1 changed files with 9 additions and 0 deletions

View File

@ -3958,6 +3958,15 @@ static ImBuf *image_get_render_result(Image *ima, ImageUser *iuser, void **r_loc
ibuf->flags &= ~IB_zbuffloat;
}
/* TODO(sergey): Make this faster by either simply referencing the stamp
* or by changing both ImBug and RenderResult to use same data type to
* store metadata. */
if (ibuf->metadata != NULL) {
IMB_metadata_free(ibuf->metadata);
ibuf->metadata = NULL;
}
BKE_imbuf_stamp_info(&rres, ibuf);
BLI_thread_unlock(LOCK_COLORMANAGE);
ibuf->dither = dither;