diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 20:48:47 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-02-04 20:48:55 +0300 |
commit | f75d2fdd24ed0a8633682dadd57ca9b9929dd4f4 (patch) | |
tree | 89a2f1e171e7f0bbd98c9fe348ebdee647ef9203 /source/blender/blenkernel/intern/sequencer.c | |
parent | 4339caf7cb95340dcdc7c050af46916ed1b34811 (diff) |
Port fix from gooseberry that doesn't load the full res file if a proxy
is requested.
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 45036369269..dd46fdcfbed 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1330,7 +1330,7 @@ static double seq_rendersize_to_scale_factor(int size) return 0.25; } -static void seq_open_anim_file(Sequence *seq) +static void seq_open_anim_file(Sequence *seq, bool openfile) { char name[FILE_MAX]; StripProxy *proxy; @@ -1343,8 +1343,14 @@ static void seq_open_anim_file(Sequence *seq) seq->strip->dir, seq->strip->stripdata->name); BLI_path_abs(name, G.main->name); - seq->anim = openanim(name, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0), - seq->streamindex, seq->strip->colorspace_settings.name); + if (openfile) { + seq->anim = openanim(name, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0), + seq->streamindex, seq->strip->colorspace_settings.name); + } + else { + seq->anim = openanim_noload(name, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0), + seq->streamindex, seq->strip->colorspace_settings.name); + } if (seq->anim == NULL) { return; @@ -1458,7 +1464,7 @@ static ImBuf *seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int c return NULL; } - seq_open_anim_file(seq); + seq_open_anim_file(seq, true); frameno = IMB_anim_index_get_frame_index(seq->anim, seq->strip->proxy->tc, frameno); @@ -1560,7 +1566,7 @@ SeqIndexBuildContext *BKE_sequencer_proxy_rebuild_context(Main *bmain, Scene *sc context->seq = nseq; if (nseq->type == SEQ_TYPE_MOVIE) { - seq_open_anim_file(nseq); + seq_open_anim_file(nseq, true); if (nseq->anim) { context->index_context = IMB_anim_index_rebuild_context(nseq->anim, @@ -2780,7 +2786,7 @@ static ImBuf *do_render_strip_uncached(const SeqRenderData *context, Sequence *s case SEQ_TYPE_MOVIE: { - seq_open_anim_file(seq); + seq_open_anim_file(seq, false); if (seq->anim) { IMB_Proxy_Size proxy_size = seq_rendersize_to_proxysize(context->preview_render_size); |