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:
authorAntony Riakiotakis <kalast@gmail.com>2015-04-20 20:57:57 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-04-21 19:37:06 +0300
commit50bfc4bfa0eabb68fcb5b5e82f80281fbaddcfeb (patch)
tree5ee5ecd548454b8464efb35ded40a22792d17e36 /source/blender/editors/space_image/image_ops.c
parentf9972fa53eaab4d1e8fd7b435f6f65c1ac5501e1 (diff)
Metadata display support - patch by Julian and me.
Basically, blender adds a few metadata fields to images when we render an image. Those metadata can now be viewed in the image editor. Also, made sure metadata are available when we write imbufs to disc with "Save As". There may be more cases here that need fixing, but this means that loading an image with metadata will now properly preserve them in blender.
Diffstat (limited to 'source/blender/editors/space_image/image_ops.c')
-rw-r--r--source/blender/editors/space_image/image_ops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 756f90fe560..2fe2e6615a6 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1672,6 +1672,12 @@ static bool save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
goto cleanup;
}
}
+ if (1) {
+ Scene *scene = CTX_data_scene(C);
+ if (scene && scene->camera) {
+ BKE_imbuf_stamp_info(scene, scene->camera, ibuf);
+ }
+ }
}
/* fancy multiview OpenEXR */
@@ -1693,6 +1699,7 @@ static bool save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
}
else {
colormanaged_ibuf = IMB_colormanagement_imbuf_for_write(ibuf, save_as_render, true, &imf->view_settings, &imf->display_settings, imf);
+ IMB_metadata_copy(colormanaged_ibuf, ibuf);
ok = BKE_imbuf_write_as(colormanaged_ibuf, simopts->filepath, imf, save_copy);
save_imbuf_post(ibuf, colormanaged_ibuf);
}