diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-25 21:51:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-25 21:54:48 +0300 |
commit | 7e40a231a7c55a6745511221a74137317bd0aaec (patch) | |
tree | 817c4321d92e2371d7d412bddc1c93ba66646e2b /source | |
parent | 9ad379fe559200e7a17a3c9571ff0785a095dfac (diff) |
Fix T61946: Cycles border render missing samples and crypto metadata.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 18 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 1 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_result.c | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 6bfccf254e1..d7f56c258d7 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -68,6 +68,7 @@ void BKE_imbuf_stamp_info(struct RenderResult *rr, struct ImBuf *ibuf); void BKE_stamp_info_from_imbuf(struct RenderResult *rr, struct ImBuf *ibuf); void BKE_stamp_info_callback(void *data, struct StampData *stamp_data, StampCallback callback, bool noskip); void BKE_render_result_stamp_data(struct RenderResult *rr, const char *key, const char *value); +struct StampData *BKE_stamp_data_copy(const struct StampData *stamp_data); void BKE_stamp_data_free(struct StampData *stamp_data); void BKE_image_stamp_buf( struct Scene *scene, struct Object *camera, const struct StampData *stamp_data_template, diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index ff6719fbb49..bf8edf5c71f 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -2194,7 +2194,23 @@ void BKE_render_result_stamp_data(RenderResult *rr, const char *key, const char BLI_addtail(&stamp_data->custom_fields, field); } -void BKE_stamp_data_free(struct StampData *stamp_data) +StampData *BKE_stamp_data_copy(const StampData *stamp_data) +{ + if (stamp_data == NULL) { + return NULL; + } + + StampData *stamp_datan = MEM_dupallocN(stamp_data); + BLI_duplicatelist(&stamp_datan->custom_fields, &stamp_data->custom_fields); + + LISTBASE_FOREACH(StampDataCustomField *, custom_fieldn, &stamp_datan->custom_fields) { + custom_fieldn->value = MEM_dupallocN(custom_fieldn->value); + } + + return stamp_datan; +} + +void BKE_stamp_data_free(StampData *stamp_data) { if (stamp_data == NULL) { return; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index bb8e70a20cc..1b425540145 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1890,6 +1890,7 @@ static void render_result_uncrop(Render *re) render_result_disprect_to_full_resolution(re); rres = render_result_new(re, &re->disprect, 0, RR_USE_MEM, RR_ALL_LAYERS, RR_ALL_VIEWS); + rres->stamp_data = BKE_stamp_data_copy(re->result->stamp_data); render_result_clone_passes(re, rres, NULL); diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index adce14b646e..822c996c504 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -1557,6 +1557,6 @@ RenderResult *RE_DuplicateRenderResult(RenderResult *rr) if (new_rr->rectz != NULL) { new_rr->rectz = MEM_dupallocN(new_rr->rectz); } - new_rr->stamp_data = MEM_dupallocN(new_rr->stamp_data); + new_rr->stamp_data = BKE_stamp_data_copy(new_rr->stamp_data); return new_rr; } |