diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-02-01 19:58:26 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-02-01 19:58:26 +0400 |
commit | e6efe93c094e12e4efda9952f5b3391fc8f8e852 (patch) | |
tree | 273b2ee5f45044a09013c904fa6aa6039c85760d /source/blender/modifiers/intern/MOD_fluidsim_util.c | |
parent | 5504ba6f501ce7b8b96d210d56cfd457179f09ba (diff) |
Optional offset for fluid cache frame reading.
This was a request by Daniel Salazar. It adds a new frame offset variable to fluid sim settings, which can be used to display baked fluid sims at different times. Eventually this could be replaced by real NLA strips for cached data, but until then this is a simple way to have more flexible cache result usage.
Not strictly a BCon3 patch, but after IRC discussion with Genscher, ZanQdo and kaito decided to commit it anyway, since it's a small feature and makes fluid sim a bit more usable. Similar patch for point cache (particles, smoke, cloth) is being worked on as well.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim_util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index b62a497a10c..38909a2671a 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -475,6 +475,9 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, Fluidsim break; } + /* offset baked frame */ + curFrame += fss->frameOffset; + BLI_path_abs(targetFile, modifier_path_relbase(ob)); BLI_path_frame(targetFile, curFrame, 0); // fixed #frame-no |