[Bf-blender-cvs] [449bea5] fluid-mantaflow: fix in pointcache: make sure file is saved before trying to write liquid cache

Sebastián Barschkis noreply at git.blender.org
Tue Aug 16 13:17:25 CEST 2016


Commit: 449bea54384dd824ef5d055e3405ad4da6043aec
Author: Sebastián Barschkis
Date:   Tue Aug 16 13:15:17 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB449bea54384dd824ef5d055e3405ad4da6043aec

fix in pointcache: make sure file is saved before trying to write liquid cache

===================================================================

M	source/blender/blenkernel/intern/pointcache.c

===================================================================

diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 83f6b99..9936012 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -2968,6 +2968,10 @@ static int ptcache_write_liquid_stream(PTCacheID *pid, int cfra)
 
 	BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_FRAME, cfra);
 	
+	/* save blend file before using disk pointcache */
+	if (!G.relbase_valid && (pid->cache->flag & PTCACHE_EXTERNAL)==0)
+		return 0;
+
 	ptcache_filename(pid, filename, cfra, 1, 1);
 	ptcache_path(pid, pathname);




More information about the Bf-blender-cvs mailing list