diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-03-24 14:24:30 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-03-24 14:24:54 +0300 |
commit | 7293f6d4863a2f80fa38697f4e55ccdc0aec9e6b (patch) | |
tree | f0ad7563c253d56457fa6ad33c81d2bcbee53a15 /source/blender/blenloader | |
parent | 765fd7044b2bb65d844c2c705d30c858d9930da1 (diff) |
Cleanup - move proxy storage options to the proxy itself - also will
enable more storage options, since seq->flag is running out of space
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 26 |
2 files changed, 31 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 4125451ead9..7c148f1a2e9 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -797,13 +797,17 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *main) BLI_path_abs(str, main->name); seq->sound = sound_new_file(main, str); } +#define SEQ_USE_PROXY_CUSTOM_DIR (1 << 19) +#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21) /* don't know, if anybody used that this way, but just in case, upgrade to new way... */ if ((seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) && !(seq->flag & SEQ_USE_PROXY_CUSTOM_DIR)) { BLI_snprintf(seq->strip->proxy->dir, FILE_MAXDIR, "%s/BL_proxy", seq->strip->dir); } - } +#undef SEQ_USE_PROXY_CUSTOM_DIR +#undef SEQ_USE_PROXY_CUSTOM_FILE + } SEQ_END } } diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 9c8db6d6a9b..30070450bde 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -39,6 +39,7 @@ #include "DNA_cloth_types.h" #include "DNA_constraint_types.h" #include "DNA_sdna_types.h" +#include "DNA_sequence_types.h" #include "DNA_space_types.h" #include "DNA_screen_types.h" #include "DNA_object_types.h" @@ -53,6 +54,7 @@ #include "BKE_main.h" #include "BKE_modifier.h" #include "BKE_node.h" +#include "BKE_sequencer.h" #include "BKE_screen.h" #include "BLI_math.h" @@ -700,4 +702,28 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } FOREACH_NODETREE_END } + + if (!DNA_struct_elem_find(fd->filesdna, "Sequence", "char", "storage")) { + Scene *scene; + Sequence *seq; + +#define SEQ_USE_PROXY_CUSTOM_DIR (1 << 19) +#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21) + + for (scene = main->scene.first; scene; scene = scene->id.next) { + SEQ_BEGIN (scene->ed, seq) { + if (seq->strip && seq->strip->proxy) { + if (seq->flag & SEQ_USE_PROXY_CUSTOM_DIR) + seq->strip->proxy->storage = SEQ_STORAGE_PROXY_CUSTOM_DIR; + if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) + seq->strip->proxy->storage = SEQ_STORAGE_PROXY_CUSTOM_FILE; + } + } + SEQ_END + + printf("lala\n"); + } +#undef SEQ_USE_PROXY_CUSTOM_DIR +#undef SEQ_USE_PROXY_CUSTOM_FILE + } } |