diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-07-12 20:33:37 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-07-12 20:33:37 +0400 |
commit | 7e304b13e758161428de8601d78fe77ae87ac33f (patch) | |
tree | db94533036642c0e8270f05758bf854ecaa91e08 /source/blender | |
parent | 8d9229538cf40fa4a9329dc45a927f3780330abe (diff) |
Fix #36115: dynamic paint not showing correct result after file load or undo.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 4 |
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; |