[Bf-blender-cvs] [7760e97] master: More hacks for proxy generation:
Antony Riakiotakis
noreply at git.blender.org
Fri Jan 30 14:30:38 CET 2015
Commit: 7760e97c6bf5e8b09f99ba8b5ec17db6eb95acf5
Author: Antony Riakiotakis
Date: Fri Jan 30 14:30:13 2015 +0100
Branches: master
https://developer.blender.org/rB7760e97c6bf5e8b09f99ba8b5ec17db6eb95acf5
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.
===================================================================
M source/blender/imbuf/intern/indexer.c
===================================================================
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 38ceca9..8b62555 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
More information about the Bf-blender-cvs
mailing list