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-01-30 16:30:13 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-01-30 16:30:24 +0300
commit7760e97c6bf5e8b09f99ba8b5ec17db6eb95acf5 (patch)
treec7ad0fd735acdeb848d44e3152cc9004c2e20f99 /source/blender/imbuf/intern/indexer.c
parentd8c20fbb6628a40cd83f1ecac5d0838c07100b24 (diff)
More hacks for proxy generation:
Touch the proxy files if they do not exist so subsequent strips referencing the same source file won't regenerate it.
Diffstat (limited to 'source/blender/imbuf/intern/indexer.c')
-rw-r--r--source/blender/imbuf/intern/indexer.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 38ceca916a9..8b62555a05c 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -1153,11 +1153,12 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecod
{
IndexBuildContext *context = NULL;
IMB_Proxy_Size proxy_sizes_to_build = proxy_sizes_in_use;
-
+ int i;
+
if (!overwrite) {
IMB_Proxy_Size built_proxies = IMB_anim_proxy_get_existing(anim);
if (built_proxies != 0) {
- int i;
+
for (i = 0; i < IMB_PROXY_MAX_SLOT; ++i) {
IMB_Proxy_Size proxy_size = proxy_sizes[i];
if (proxy_size & built_proxies) {
@@ -1165,6 +1166,22 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecod
get_proxy_filename(anim, proxy_size, filename, false);
printf("Skipping proxy: %s\n", filename);
}
+ /* if file doesn't exist, create it here so subsequent runs won't re-add it for generation */
+ else if (proxy_size & proxy_sizes_to_build) {
+ char filename[FILE_MAX];
+ get_proxy_filename(anim, proxy_size, filename, false);
+ BLI_file_touch(filename);
+ }
+ }
+ }
+ else {
+ for (i = 0; i < IMB_PROXY_MAX_SLOT; ++i) {
+ IMB_Proxy_Size proxy_size = proxy_sizes[i];
+ if (proxy_size & proxy_sizes_to_build) {
+ char filename[FILE_MAX];
+ get_proxy_filename(anim, proxy_size, filename, false);
+ BLI_file_touch(filename);
+ }
}
}
proxy_sizes_to_build &= ~built_proxies;
@@ -1173,6 +1190,7 @@ IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecod
if (proxy_sizes_to_build == 0) {
return NULL;
}
+
switch (anim->curtype) {
#ifdef WITH_FFMPEG