diff options
author | Matt Ebb <matt@mke3.net> | 2010-05-03 07:02:27 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-05-03 07:02:27 +0400 |
commit | 23ccac18cdf285bce72c60bd15cd6b0249954379 (patch) | |
tree | 748b4df9a7937c39a7bd94d8fa85e0e833e5b18f /source/blender/blenkernel/intern/pointcache.c | |
parent | 43f0fd08b3bfd61df5f18f942502ee42dae2254f (diff) |
Fix [#22199] Cloth Cache Panel > Disk Cache doesn't work
Condition for this to work (.blend file must be saved) was poorly communicated
in the UI (printfs are no good for this - ideally should use reports). Tweaked this a bit.
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 3d02f175174..25f8dc9bd56 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2652,7 +2652,8 @@ void BKE_ptcache_mem_to_disk(PTCacheID *pid) ptcache_file_init_pointers(pf); if(!ptcache_file_write_header_begin(pf) || !pid->write_header(pf)) { - printf("Error writing to disk cache\n"); + if (G.f & G_DEBUG) + printf("Error writing to disk cache\n"); cache->flag &= ~PTCACHE_DISK_CACHE; ptcache_file_close(pf); @@ -2662,7 +2663,8 @@ void BKE_ptcache_mem_to_disk(PTCacheID *pid) for(i=0; i<pm->totpoint; i++) { ptcache_copy_data(pm->cur, pf->cur); if(!ptcache_file_write_data(pf)) { - printf("Error writing to disk cache\n"); + if (G.f & G_DEBUG) + printf("Error writing to disk cache\n"); cache->flag &= ~PTCACHE_DISK_CACHE; ptcache_file_close(pf); @@ -2678,7 +2680,8 @@ void BKE_ptcache_mem_to_disk(PTCacheID *pid) BKE_ptcache_write_cache(pid, 0); } else - printf("Error creating disk cache file\n"); + if (G.f & G_DEBUG) + printf("Error creating disk cache file\n"); } } void BKE_ptcache_toggle_disk_cache(PTCacheID *pid) @@ -2688,7 +2691,8 @@ void BKE_ptcache_toggle_disk_cache(PTCacheID *pid) if (!G.relbase_valid){ cache->flag &= ~PTCACHE_DISK_CACHE; - printf("File must be saved before using disk cache!\n"); + if (G.f & G_DEBUG) + printf("File must be saved before using disk cache!\n"); return; } |