diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2016-08-11 13:36:29 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2016-08-11 13:36:29 +0300 |
commit | 1fe9d671cf19f339917a78cb3ab0b6148ab1ceff (patch) | |
tree | 7ccc41beb5205f31e7bd99913aa34c5f4df35abb /source/blender/blenkernel/BKE_pointcache.h | |
parent | fdc43f993da8e89a08bc018315aaa4468b29a456 (diff) |
Fix T49004 and motion blur of cloth, softbody, etc past the end frame.
Point cache read code contains checks designed to prevent it reading
stale data when the relevant simulation code should instead compute
the next frame from the previous one. However in some situations like
motion blur subframes the simulation can't possibly do it and just
exits. This causes completely incorrect motion blur at or after the
last cached frame.
To fix, add a parameter that tells the cache code whether it should
apply the checks and exit, or read what it can even if stale (true
means exactly same as old behavior).
Doing this in cache rather than clamping the frame number better in
the caller lets it handle the case of incomplete cache that stops
before the official last frame.
Reviewed By: mont29, lukastoenne
Maniphest Tasks: T49004
Differential Revision: https://developer.blender.org/D2144
Diffstat (limited to 'source/blender/blenkernel/BKE_pointcache.h')
-rw-r--r-- | source/blender/blenkernel/BKE_pointcache.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index 8238ea64242..02f6c435ee2 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -304,7 +304,7 @@ void BKE_ptcache_mem_pointers_incr(struct PTCacheMem *pm); int BKE_ptcache_mem_pointers_seek(int point_index, struct PTCacheMem *pm); /* Main cache reading call. */ -int BKE_ptcache_read(PTCacheID *pid, float cfra); +int BKE_ptcache_read(PTCacheID *pid, float cfra, bool no_extrapolate_old); /* Main cache writing call. */ int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra); |