Sequencer: IF effect strip only affects on a single strip use source metadata for the result

This way it's possible to have some color-correction modifications on
top of the render result and yet still have proper metadata stored.

Usecase: Access per-frame render-time of the movie frames from the
final export.
This commit is contained in:
Sergey Sharybin 2016-02-01 10:19:55 +01:00
parent d55bd1bd87
commit b3daf92f7e
1 changed files with 6 additions and 0 deletions

View File

@ -146,6 +146,11 @@ static ImBuf *prepare_effect_imbufs(const SeqRenderData *context, ImBuf *ibuf1,
if (out->rect_float)
IMB_colormanagement_assign_float_colorspace(out, scene->sequencer_colorspace_settings.name);
/* If effect only affecting a single channel, forward input's metadata to the output. */
if (ibuf1 != NULL && ibuf1 == ibuf2 && ibuf2 == ibuf3) {
IMB_metadata_copy(out, ibuf1);
}
return out;
}
@ -2358,6 +2363,7 @@ static ImBuf *do_adjustment(const SeqRenderData *context, Sequence *seq, float c
if (BKE_sequencer_input_have_to_preprocess(context, seq, cfra)) {
out = IMB_dupImBuf(i);
IMB_metadata_copy(out, i);
IMB_freeImBuf(i);
}
else {