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:
authorJanne Karhu <jhkarh@gmail.com>2010-09-09 15:07:07 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-09-09 15:07:07 +0400
commit2dbb96b9722ac95420d4677e52b7acc9baaef7bc (patch)
tree5613c86d0b72320067424443c396e74dcf7fb57e /source/blender/blenkernel/intern/cloth.c
parent7abf2faa20488877de24718ef830ec6ade81b08f (diff)
Partial fix for [#21948] Full sample motion blur with cloth - cloth and collision object render issue.
* Now cloth reads cache using subframes when rendering. * Cloth cache also was reset every time on the start frame which kind of defeats the point of the caching.
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r--source/blender/blenkernel/intern/cloth.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index bebfa4af88e..be1552a882d 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -446,7 +446,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
return dm;
}
- if(clmd->sim_parms->reset || (framenr == (startframe - clmd->sim_parms->preroll)))
+ if(clmd->sim_parms->reset || (framenr == (startframe - clmd->sim_parms->preroll) && clmd->sim_parms->preroll != 0))
{
clmd->sim_parms->reset = 0;
cache->flag |= PTCACHE_OUTDATED;
@@ -512,7 +512,7 @@ DerivedMesh *clothModifier_do(ClothModifierData *clmd, Scene *scene, Object *ob,
}
/* try to read from cache */
- cache_result = BKE_ptcache_read_cache(&pid, (float)framenr, scene->r.frs_sec);
+ cache_result = BKE_ptcache_read_cache(&pid, (float)framenr+scene->r.subframe, scene->r.frs_sec);
if(cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED) {
implicit_set_positions(clmd);