diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-17 11:32:18 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-17 11:32:18 +0400 |
commit | 5fd24dc3f2f4ad440a7032325fad999b32726c4e (patch) | |
tree | 3a3458c9192d78f6f00f74c8434653a55e181da4 /source/blender | |
parent | 283ab431a50e89643eb496c934584e29e118b812 (diff) |
Build proxy from meta and image strips used resolution used for display,
not set by building job which leads to unusable proxies.
This change should resolve issues reported in #30229: Sequencer Meta strip Proxy Fails
and probably #30196 will work nicer too.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 0790896da0d..b2188754503 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1192,11 +1192,10 @@ static void seq_open_anim_file(Sequence * seq) } -static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, char * name) +static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * name) { int frameno; char dir[PROXY_MAXFILE]; - int render_size = context.preview_render_size; if (!seq->strip->proxy) { return FALSE; @@ -1226,22 +1225,17 @@ static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, return TRUE; } - /* dirty hack to distinguish 100% render size from PROXY_100 */ - if (render_size == 99) { - render_size = 100; - } - /* generate a separate proxy directory for each preview size */ if (seq->type == SEQ_IMAGE) { BLI_snprintf(name, PROXY_MAXFILE, "%s/images/%d/%s_proxy", dir, - context.preview_render_size, + render_size, give_stripelem(seq, cfra)->name); frameno = 1; } else { frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; BLI_snprintf(name, PROXY_MAXFILE, "%s/proxy_misc/%d/####", dir, - context.preview_render_size); + render_size); } BLI_path_abs(name, G.main->name); @@ -1258,6 +1252,12 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int IMB_Proxy_Size psize = seq_rendersize_to_proxysize( context.preview_render_size); int size_flags; + int render_size = context.preview_render_size; + + /* dirty hack to distinguish 100% render size from PROXY_100 */ + if (render_size == 99) { + render_size = 100; + } if (!(seq->flag & SEQ_USE_PROXY)) { return NULL; @@ -1273,7 +1273,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) { int frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; if (seq->strip->proxy->anim == NULL) { - if (seq_proxy_get_fname(context, seq, cfra, name)==0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name)==0) { return NULL; } @@ -1292,7 +1292,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int IMB_TC_NONE, IMB_PROXY_NONE); } - if (seq_proxy_get_fname(context, seq, cfra, name) == 0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name) == 0) { return NULL; } @@ -1313,7 +1313,7 @@ static void seq_proxy_build_frame(SeqRenderData context, int ok; struct ImBuf * ibuf; - if (!seq_proxy_get_fname(context, seq, cfra, name)) { + if (!seq_proxy_get_fname(seq, cfra, proxy_render_size, name)) { return; } |