diff options
Diffstat (limited to 'intern/mantaflow/intern/MANTA_main.cpp')
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index 0b7f9b2590e..a2666135c34 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -81,6 +81,7 @@ MANTA::MANTA(int *res, FluidModifierData *mmd) : mCurrentID(++solverID) mUsingNoise = (mds->flags & FLUID_DOMAIN_USE_NOISE) && mUsingSmoke; mUsingFractions = (mds->flags & FLUID_DOMAIN_USE_FRACTIONS) && mUsingLiquid; mUsingMesh = (mds->flags & FLUID_DOMAIN_USE_MESH) && mUsingLiquid; + mUsingDiffusion = (mds->flags & FLUID_DOMAIN_USE_DIFFUSION) && mUsingLiquid; mUsingMVel = (mds->flags & FLUID_DOMAIN_USE_SPEED_VECTORS) && mUsingLiquid; mUsingGuiding = (mds->flags & FLUID_DOMAIN_USE_GUIDE); mUsingDrops = (mds->particle_type & FLUID_DOMAIN_PARTICLE_SPRAY) && mUsingLiquid; @@ -230,6 +231,10 @@ MANTA::MANTA(int *res, FluidModifierData *mmd) : mCurrentID(++solverID) initLiquidMesh(); } + if (mUsingDiffusion) { + initCurvature(); + } + if (mUsingGuiding) { mResGuiding = (mds->guide_parent) ? mds->guide_res : mds->res; initGuiding(); @@ -438,6 +443,16 @@ void MANTA::initLiquidMesh(FluidModifierData *mmd) mUsingMesh = true; } +void MANTA::initCurvature(FluidModifierData *mmd) +{ + std::vector<std::string> pythonCommands; + std::string finalString = parseScript(liquid_alloc_curvature, mmd); + pythonCommands.push_back(finalString); + + runPythonString(pythonCommands); + mUsingDiffusion = true; +} + void MANTA::initObstacle(FluidModifierData *mmd) { if (!mPhiObsIn) { |