diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-17 18:10:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-17 18:10:19 +0300 |
commit | 06a1a66a9b6f120867d3bbebe3928744ec8e3495 (patch) | |
tree | 42e827a3cf58eb76474e479206b02a8d97dd3bf7 /source/blender/modifiers/intern/MOD_fluidsim_util.c | |
parent | 61d27db35967710421ab92748e09624db068258d (diff) | |
parent | a24b4e6090057479796e914bc603119b12f6ca06 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim_util.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index 4bcc14236a0..cea9e69526c 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -72,10 +72,10 @@ void fluidsim_init(FluidsimModifierData *fluidmd) FluidsimSettings *fss = MEM_callocN(sizeof(FluidsimSettings), "fluidsimsettings"); fluidmd->fss = fss; - + if (!fss) return; - + fss->fmd = fluidmd; fss->type = OB_FLUIDSIM_ENABLE; fss->threads = 0; @@ -89,12 +89,12 @@ void fluidsim_init(FluidsimModifierData *fluidmd) fss->viscosityValue = 1.0; fss->viscosityExponent = 6; - + fss->grav[0] = 0.0; fss->grav[1] = 0.0; fss->grav[2] = -9.81; - fss->animStart = 0.0; + fss->animStart = 0.0; fss->animEnd = 4.0; fss->animRate = 1.0; fss->gstar = 0.005; // used as normgstar @@ -130,18 +130,18 @@ void fluidsim_init(FluidsimModifierData *fluidmd) fss->cpsTimeStart = fss->animStart; fss->cpsTimeEnd = fss->animEnd; fss->cpsQuality = 10.0; // 1.0 / 10.0 => means 0.1 width - + /* * BAD TODO: this is done in buttons_object.c in the moment * Mesh *mesh = ob->data; * // calculate bounding box * fluid_get_bb(mesh->mvert, mesh->totvert, ob->obmat, fss->bbStart, fss->bbSize); */ - + fss->meshVelocities = NULL; - + fss->lastgoodframe = -1; - + fss->flag |= OB_FLUIDSIM_ACTIVE; } @@ -163,7 +163,7 @@ void fluidsim_free(FluidsimModifierData *fluidmd) /* Seems to never be used, but for sqke of consistency... */ BLI_assert(fluidmd->point_cache == NULL); fluidmd->point_cache = NULL; - + return; } @@ -434,7 +434,7 @@ static DerivedMesh *fluidsim_read_cache( Object *ob, DerivedMesh *orgdm, FluidsimModifierData *fluidmd, int framenr, int useRenderParams) { - 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 */ @@ -530,7 +530,7 @@ DerivedMesh *fluidsimModifier_do( FluidsimSettings *fss = NULL; framenr = (int)DEG_get_ctime(depsgraph); - + /* only handle fluidsim domains */ if (fluidmd && fluidmd->fss && (fluidmd->fss->type != OB_FLUIDSIM_DOMAIN)) return dm; @@ -549,12 +549,12 @@ DerivedMesh *fluidsimModifier_do( framenr = fss->lastgoodframe - framenr + 1; CLAMP(framenr, 1, fss->lastgoodframe); } - + /* try to read from cache */ /* if the frame is there, fine, otherwise don't do anything */ if ((result = fluidsim_read_cache(ob, dm, fluidmd, framenr, useRenderParams))) return result; - + return dm; #else /* unused */ |