Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-07-12 20:33:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-07-12 20:33:37 +0400
commit7e304b13e758161428de8601d78fe77ae87ac33f (patch)
treedb94533036642c0e8270f05758bf854ecaa91e08 /source/blender/blenkernel/intern/dynamicpaint.c
parent8d9229538cf40fa4a9329dc45a927f3780330abe (diff)
Fix #36115: dynamic paint not showing correct result after file load or undo.
Diffstat (limited to 'source/blender/blenkernel/intern/dynamicpaint.c')
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index a668c6a6d7b..a6811af1a94 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1942,6 +1942,7 @@ static void dynamicPaint_frameUpdate(DynamicPaintModifierData *pmd, Scene *scene
/* 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 @@ static void dynamicPaint_frameUpdate(DynamicPaintModifierData *pmd, Scene *scene
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;