diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-25 13:16:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-25 13:16:49 +0300 |
commit | 8850775ce86fc2873f00bdd87aaec11f460c298a (patch) | |
tree | e46ecd0ba8c6187cc78350fd63e7e9175e5585d7 /source/blender/blenkernel/intern/seqmodifier.c | |
parent | 4f8b7f44206264d38562bb92a7c73596ab7d3b6c (diff) |
Sequencer: Add option to use absolute mask animation time
This is handy for cases when mask is created on top of the edit and
used for tasks like color grading and other enhancement.
That was the main purpose of the masks which was totally broken in
6786ef6. Now it's possible to have masks created as both a part of
input movie roto process (which then better be re-mapped to the strip
timing) and as a grading tool (which should be using scene timing
for the animation).
Thanks artists from the Nieve for screaming about such a broken case.
Diffstat (limited to 'source/blender/blenkernel/intern/seqmodifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/seqmodifier.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/seqmodifier.c b/source/blender/blenkernel/intern/seqmodifier.c index 84d1c1bc414..2c46cf12844 100644 --- a/source/blender/blenkernel/intern/seqmodifier.c +++ b/source/blender/blenkernel/intern/seqmodifier.c @@ -978,7 +978,19 @@ ImBuf *BKE_sequence_modifier_apply_stack(const SeqRenderData *context, Sequence continue; if (smti->apply) { - ImBuf *mask = modifier_mask_get(smd, context, cfra, seq->start, ibuf->rect_float != NULL); + int frame_offset; + if (smd->mask_time == SEQUENCE_MASK_TIME_RELATIVE) { + frame_offset = seq->start; + } + else /*if (smd->mask_time == SEQUENCE_MASK_TIME_ABSOLUTE)*/ { + frame_offset = 0; + } + + ImBuf *mask = modifier_mask_get(smd, + context, + cfra, + frame_offset, + ibuf->rect_float != NULL); if (processed_ibuf == ibuf) processed_ibuf = IMB_dupImBuf(ibuf); |