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:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_image.h1
-rw-r--r--source/blender/blenkernel/intern/image.c18
-rw-r--r--source/blender/render/intern/source/pipeline.c1
-rw-r--r--source/blender/render/intern/source/render_result.c2
4 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index a6a709c204b..cbf692afd70 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -69,6 +69,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 5ab843e60c3..2a04c81230e 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2181,7 +2181,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 59697e7ea30..b41c4973e8b 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1111,6 +1111,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 bd4a31d3bc3..4809c643522 100644
--- a/source/blender/render/intern/source/render_result.c
+++ b/source/blender/render/intern/source/render_result.c
@@ -1507,6 +1507,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;
}