[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58200] trunk/blender/source/blender/ blenkernel/intern/dynamicpaint.c: Fix #36115: dynamic paint not showing correct result after file load or undo.

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jul 12 18:33:38 CEST 2013


Revision: 58200
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58200
Author:   blendix
Date:     2013-07-12 16:33:37 +0000 (Fri, 12 Jul 2013)
Log Message:
-----------
Fix #36115: dynamic paint not showing correct result after file load or undo.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c

Modified: trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c	2013-07-12 16:33:30 UTC (rev 58199)
+++ trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c	2013-07-12 16:33:37 UTC (rev 58200)
@@ -1942,6 +1942,7 @@
 		/* loop through surfaces */
 		for (; surface; surface = surface->next) {
 			int current_frame = (int)scene->r.cfra;
+			bool no_surface_data;
 
 			/* free bake data if not required anymore */
 			surface_freeUnusedData(surface);
@@ -1951,12 +1952,13 @@
 			if (!(surface->flags & MOD_DPAINT_ACTIVE)) continue;
 
 			/* make sure surface is valid */
+			no_surface_data = surface->data == NULL;
 			if (!dynamicPaint_checkSurfaceData(surface)) continue;
 
 			/* limit frame range */
 			CLAMP(current_frame, surface->start_frame, surface->end_frame);
 
-			if (current_frame != surface->current_frame || (int)scene->r.cfra == surface->start_frame) {
+			if (no_surface_data || current_frame != surface->current_frame || (int)scene->r.cfra == surface->start_frame) {
 				PointCache *cache = surface->pointcache;
 				PTCacheID pid;
 				surface->current_frame = current_frame;




More information about the Bf-blender-cvs mailing list