diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-01 18:33:04 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-01 19:02:17 +0300 |
commit | 334b55fd2e89d66023a499e1ce7f867d9789290d (patch) | |
tree | 3afcc711d6a9eeda85d9ae069ce1ac9cfc9fcb89 /source/blender/modifiers/intern/MOD_fluidsim.c | |
parent | 6b9f1ffe6e56ee4d55f4cde5c724c31a3a90292b (diff) |
Extract common modifier parameters into ModifierEvalContext struct
The contents of the ModifierEvalContext struct are constant while iterating
over the modifier stack. The struct thus should be only created once, outside
any loop over the modifiers.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c index 4f6f7bef24d..7014861bc12 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim.c +++ b/source/blender/modifiers/intern/MOD_fluidsim.c @@ -82,9 +82,8 @@ static void copyData(ModifierData *md, ModifierData *target) -static DerivedMesh *applyModifier(ModifierData *md, struct Depsgraph *UNUSED(depsgraph), - Object *ob, DerivedMesh *dm, - ModifierApplyFlag flag) +static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, + DerivedMesh *dm) { FluidsimModifierData *fluidmd = (FluidsimModifierData *) md; DerivedMesh *result = NULL; @@ -98,7 +97,8 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Depsgraph *UNUSED(dep } } - result = fluidsimModifier_do(fluidmd, md->scene, ob, dm, flag & MOD_APPLY_RENDER, flag & MOD_APPLY_USECACHE); + result = fluidsimModifier_do(fluidmd, md->scene, ctx->object, dm, + ctx->flag & MOD_APPLY_RENDER, ctx->flag & MOD_APPLY_USECACHE); return result ? result : dm; } |