diff options
-rw-r--r-- | source/blender/imbuf/intern/indexer.c | 22 |
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 |