diff options
author | Peter Schlaile <peter@schlaile.de> | 2013-02-11 01:01:30 +0400 |
---|---|---|
committer | Peter Schlaile <peter@schlaile.de> | 2013-02-11 01:01:30 +0400 |
commit | 1ba194aeddef7a4d2859d7587b60c70c03387b1c (patch) | |
tree | 198e3266e4b2824f50571dc5c5b6a6cc662ed821 /source/blender | |
parent | 50f7328fb6067cf5bf922c00a585886f9e992728 (diff) |
[#34013] [video sequence editor] Offset and crop of strips are wrong
Applied patch by jehan after confirming the issue.
Thanks for the patch!
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index f1724bdfc6b..45393726add 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1820,8 +1820,6 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra, StripCrop c = {0}; StripTransform t = {0}; int sx, sy, dx, dy; - double xscale = 1.0; - double yscale = 1.0; if (is_proxy_image) { double f = seq_rendersize_to_scale_factor(context.preview_render_size); @@ -1838,21 +1836,23 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra, t = *seq->strip->transform; } - xscale = context.scene->r.xsch ? ((double)context.rectx / (double)context.scene->r.xsch) : 1.0; - yscale = context.scene->r.ysch ? ((double)context.recty / (double)context.scene->r.ysch) : 1.0; - - xscale /= (double)context.rectx / (double)ibuf->x; - yscale /= (double)context.recty / (double)ibuf->y; - - c.left *= xscale; c.right *= xscale; - c.top *= yscale; c.bottom *= yscale; - - t.xofs *= xscale; t.yofs *= yscale; + if (is_preprocessed) { + double xscale = context.scene->r.xsch ? ((double)context.rectx / (double)context.scene->r.xsch) : 1.0; + double yscale = context.scene->r.ysch ? ((double)context.recty / (double)context.scene->r.ysch) : 1.0; + if (seq->flag & SEQ_USE_TRANSFORM) { + t.xofs *= xscale; + t.yofs *= yscale; + } + if (seq->flag & SEQ_USE_CROP) { + c.left *= xscale; + c.right *= xscale; + c.top *= yscale; + c.bottom *= yscale; + } + } sx = ibuf->x - c.left - c.right; sy = ibuf->y - c.top - c.bottom; - dx = sx; - dy = sy; if (seq->flag & SEQ_USE_TRANSFORM) { if (is_preprocessed) { @@ -1864,6 +1864,10 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra, dy = context.scene->r.ysch; } } + else { + dx = sx; + dy = sy; + } if (c.top + c.bottom >= ibuf->y || c.left + c.right >= ibuf->x || |