diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-27 18:25:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-27 18:25:23 +0300 |
commit | 9b3fa880a5d567a45215c464764f089aa3e77347 (patch) | |
tree | 503bae62dbf7979a30d36455914387048d149107 /source | |
parent | 8d1f9b9f511859e6a182f0a7bf4df5dcca355e54 (diff) |
Support subframe evaluation for scene strips
Useful when used with the speed effect.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index aa0e13124b8..08e73b6bf55 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3083,8 +3083,8 @@ static ImBuf *seq_render_mask_strip(const SeqRenderData *context, Sequence *seq, static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq, float nr, float cfra) { ImBuf *ibuf = NULL; - float frame; - float oldcfra; + double frame; + float oldcfra, oldsubframe; Object *camera; ListBase oldmarkers; @@ -3137,13 +3137,15 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq } scene = seq->scene; - frame = scene->r.sfra + nr + seq->anim_startofs; + frame = (double)scene->r.sfra + (double)nr + (double)seq->anim_startofs; // have_seq = (scene->r.scemode & R_DOSEQ) && scene->ed && scene->ed->seqbase.first); /* UNUSED */ have_comp = (scene->r.scemode & R_DOCOMP) && scene->use_nodes && scene->nodetree; oldcfra = scene->r.cfra; - scene->r.cfra = frame; + oldsubframe = scene->r.subframe; + + BKE_scene_frame_set(scene, frame); if (seq->scene_camera) { camera = seq->scene_camera; @@ -3159,6 +3161,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq if (have_comp == false && camera == NULL) { scene->r.cfra = oldcfra; + scene->r.subframe = oldsubframe; return NULL; } @@ -3273,6 +3276,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq scene->r.scemode |= do_seq; scene->r.cfra = oldcfra; + scene->r.subframe = oldsubframe; if (frame != oldcfra) { BKE_scene_update_for_newframe(context->eval_ctx, context->bmain, scene, scene->lay); |