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:
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index b0f8cc9c330..d7dc96abfac 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -738,20 +738,21 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d
/* jump to a non-existing frame makes sim reset if cache is not protected */
if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT))
{
- /*
- clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
- */
- clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE;
- cloth_clear_cache(ob, clmd, 0);
-
- cloth_write_cache(ob, clmd, framenr);
+ /* prevent freeing when used with vectorblur */
+ if(!useRenderParams)
+ {
+ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_CCACHE_FFREE;
+ cloth_clear_cache(ob, clmd, 0);
+
+ cloth_write_cache(ob, clmd, framenr);
+ }
}
}
}
else
{
if(G.rt > 0)
- printf("dt > 1.0 || dt < 0.0, %f\n", framenr);
+ printf("dt > 1.0 || dt < 0.0, %f, st: %f, ct: %f\n", framenr, clmd->sim_parms->sim_time, current_time);
if(cloth_read_cache(ob, clmd, framenr))
{
cloth_to_object (ob, clmd, result);
@@ -761,7 +762,11 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd,Object *ob, DerivedMesh *d
{
/* jump to a non-existing frame makes sim reset if cache is not protected */
if(!(clmd->sim_parms->flags & CLOTH_SIMSETTINGS_FLAG_CCACHE_PROTECT))
- clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
+ {
+ /* prevent freeing when used with vectorblur */
+ if(!useRenderParams)
+ clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESET;
+ }
}
clmd->sim_parms->sim_time = current_time;
}