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:
authorBastien Montagne <montagne29@wanadoo.fr>2018-05-23 17:36:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-05-23 17:37:36 +0300
commit0cc2666605d84cc43e8be5d4b3f65f903346f205 (patch)
tree25769500efadc3dbb62803640720a3e60970e502 /source/blender/modifiers/intern/MOD_fluidsim_util.c
parent9cb2b9b523ec73b8fab2d0d7785576e3ae9fb9f2 (diff)
Fix last usages of Scene.r.cfra in modifiers code.
Note that some modifiers-related code in BKE still uses that...
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 1aed6309359..5f7cd1e0d60 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -52,6 +52,9 @@
# include "BKE_global.h"
#endif
+#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
+
#include "MOD_fluidsim_util.h"
#include "MOD_modifiertypes.h"
@@ -512,17 +515,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))
@@ -552,10 +558,8 @@ DerivedMesh *fluidsimModifier_do(
#else
/* unused */
(void)fluidmd;
- (void)scene;
- (void)ob;
+ (void)ctx;
(void)dm;
- (void)useRenderParams;
return NULL;
#endif
}