Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index e366116a5fb..cea9e69526c 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -53,6 +53,9 @@
# include "BKE_global.h"
#endif
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
+
#include "MOD_fluidsim_util.h"
#include "MOD_modifiertypes.h"
@@ -513,17 +516,20 @@ static DerivedMesh *fluidsim_read_cache(
#endif // WITH_MOD_FLUID
DerivedMesh *fluidsimModifier_do(
- FluidsimModifierData *fluidmd, Scene *scene,
- Object *ob,
- DerivedMesh *dm,
- int useRenderParams, int UNUSED(isFinalCalc))
+ FluidsimModifierData *fluidmd,
+ const ModifierEvalContext *ctx,
+ DerivedMesh *dm)
{
#ifdef WITH_MOD_FLUID
+ Object *ob = ctx->object;
+ Depsgraph *depsgraph = ctx->depsgraph;
+ const bool useRenderParams = (ctx->flag & MOD_APPLY_RENDER) != 0;
+// const bool isFinalCalc = (ctx->flag & MOD_APPLY_USECACHE) != 0;
DerivedMesh *result = NULL;
int framenr;
FluidsimSettings *fss = NULL;
- framenr = (int)scene->r.cfra;
+ framenr = (int)DEG_get_ctime(depsgraph);
/* only handle fluidsim domains */
if (fluidmd && fluidmd->fss && (fluidmd->fss->type != OB_FLUIDSIM_DOMAIN))
@@ -553,10 +559,8 @@ DerivedMesh *fluidsimModifier_do(
#else
/* unused */
(void)fluidmd;
- (void)scene;
- (void)ob;
+ (void)ctx;
(void)dm;
- (void)useRenderParams;
return NULL;
#endif
}