Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2015-03-25 14:05:34 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-03-25 14:05:34 +0300
commita180c8e2ed6ce62e6a15d28a0bb7f60bb58bc0cb (patch)
tree70d50ea80ac6aa47e561538338dd08ff322fbb82 /source/blender/blenkernel
parent22dfb506229258e293d7ab32a2c495ce93084e9d (diff)
Allow multiple strips to use the same directory when custom proxy
directory is used. This is done by appending the name of the file as extra folder. Existing projects may need to regenerate their proxies but it should be possible now to have all proxies nicely in the same custom folder. Next commits will include operators to copy directory settings between selected strips, making the process faster.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 19120d4da93..eb7736fff30 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1364,7 +1364,11 @@ static void seq_open_anim_file(Sequence *seq, bool openfile)
if (proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_DIR) {
char dir[FILE_MAX];
+ char fname[FILE_MAXFILE];
BLI_strncpy(dir, seq->strip->proxy->dir, sizeof(dir));
+ IMB_anim_get_fname(seq->anim, fname, FILE_MAXFILE);
+ BLI_path_append(dir, sizeof(dir), fname);
+
BLI_path_abs(dir, G.main->name);
IMB_anim_set_index_dir(seq->anim, dir);
@@ -1390,8 +1394,14 @@ static bool seq_proxy_get_fname(Sequence *seq, int cfra, int render_size, char *
* have both, a directory full of jpeg files and proxy avis, so
* sorry folks, please rebuild your proxies... */
- if (proxy->storage & (SEQ_STORAGE_PROXY_CUSTOM_DIR | SEQ_STORAGE_PROXY_CUSTOM_FILE)) {
+ if ((proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_DIR) && (proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_FILE)) {
+ BLI_strncpy(dir, seq->strip->proxy->dir, sizeof(dir));
+ }
+ else if (seq->anim && (proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_DIR)) {
+ char fname[FILE_MAXFILE];
BLI_strncpy(dir, seq->strip->proxy->dir, sizeof(dir));
+ IMB_anim_get_fname(seq->anim, fname, FILE_MAXFILE);
+ BLI_path_append(dir, sizeof(dir), fname);
}
else if (seq->type == SEQ_TYPE_IMAGE) {
BLI_snprintf(dir, PROXY_MAXFILE, "%s/BL_proxy", seq->strip->dir);
@@ -1402,7 +1412,7 @@ static bool seq_proxy_get_fname(Sequence *seq, int cfra, int render_size, char *
if (proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_FILE) {
BLI_join_dirfile(name, PROXY_MAXFILE,
- dir, seq->strip->proxy->file);
+ dir, proxy->file);
BLI_path_abs(name, G.main->name);
return true;
@@ -1436,15 +1446,15 @@ static ImBuf *seq_proxy_fetch(const SeqRenderData *context, Sequence *seq, int c
int render_size = context->preview_render_size;
StripProxy *proxy = seq->strip->proxy;
+ if (!(seq->flag & SEQ_USE_PROXY)) {
+ return NULL;
+ }
+
/* 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;
- }
-
size_flags = proxy->build_size_flags;
/* only use proxies, if they are enabled (even if present!) */