diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-11-23 09:00:07 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-11-23 09:00:07 +0400 |
commit | ef67ddeba9c9f1f99129da3a4a7eb6b535a542e5 (patch) | |
tree | 1eb091638eb19e38ab15a77efb518ca47b66f5fa /source/blender/modifiers | |
parent | 7189a9db514e2ba8f79ed3cf5bc6d00ea6ff4b8c (diff) |
Bugfix [#29186] Object contribute to fluid sim animation start earlier than keyframe
Also fix:
- Fluid simulation was always lagging 1 frame behind: E.g. the 250th frame in blender showed 249th frame of the fluid simulation.
Change:
- Animated enabled/disabled property only gets counted as "on" if value >= 1
Note that this bugfix should solve many problems with timings of animated fluid sim properties.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim_util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index 47523286229..13d409dc941 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -426,7 +426,11 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, FluidsimModifierData *fluidmd, int framenr, int useRenderParams) { int displaymode = 0; - int curFrame = framenr - 1 /*scene->r.sfra*/; /* start with 0 at start frame */ + + int curFrame = framenr /* - 1 */ /*scene->r.sfra*/; /* start with 0 at start frame */ + /* why start with 0 as start frame?? Animations + time are frozen for frame 0 anyway. (See physics_fluid.c for that. - DG */ + /* If we start with frame 0, we need to remap all animation channels, too, because they will all be 1 frame late if using frame-1! - DG */ + char targetFile[FILE_MAX]; FluidsimSettings *fss = fluidmd->fss; DerivedMesh *dm = NULL; |