Commit: 68ccc63c1b559d04a053705a5af7485ac9f5c8c0
Author: Sebastián Barschkis
Date:   Thu May 19 21:30:23 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB68ccc63c1b559d04a053705a5af7485ac9f5c8c0

added liquid init function (putting together manta script and firing off first 
python call)

===================================================================

M       intern/mantaflow/intern/LIQUID.cpp
M       intern/mantaflow/intern/SMOKE.cpp

===================================================================

diff --git a/intern/mantaflow/intern/LIQUID.cpp 
b/intern/mantaflow/intern/LIQUID.cpp
index 9177ecb..4a66af1 100644
--- a/intern/mantaflow/intern/LIQUID.cpp
+++ b/intern/mantaflow/intern/LIQUID.cpp
@@ -57,8 +57,7 @@ void LIQUID::initSetup()
                + alloc_liquid
                + liquid_variables
                + prep_domain
-               + mesh_loading
-               + manta_step
+               + adaptive_step_liquid
                + liquid_step;
 //     std::string finalString = parseScript(tmpString, smd);
        mCommands.clear();
diff --git a/intern/mantaflow/intern/SMOKE.cpp 
b/intern/mantaflow/intern/SMOKE.cpp
index 7c35139..bfb49f3 100644
--- a/intern/mantaflow/intern/SMOKE.cpp
+++ b/intern/mantaflow/intern/SMOKE.cpp
@@ -35,6 +35,7 @@
 #include "registry.h"
 #include "shared_script.h"
 #include "smoke_script.h"
+#include "liquid_script.h"
 
 #include "BLI_path_util.h"
 #include "BLI_utildefines.h"
@@ -240,6 +241,24 @@ void SMOKE::initColorsHigh(SmokeModifierData *smd)
        }
 }
 
+void SMOKE::initLiquid(SmokeModifierData *smd)
+{
+       std::string tmpString = manta_import
+               + solver_low
+               + adaptive_time_stepping
+               + alloc_liquid
+               + liquid_variables
+               + prep_domain
+               + adaptive_step_liquid
+               + liquid_step;
+       std::string finalString = parseScript(tmpString, smd);
+       mCommands.clear();
+       mCommands.push_back(finalString);
+
+       runPythonString(mCommands);
+       mUsingLiquid = true;
+}
+
 void SMOKE::step(SmokeModifierData *smd)
 {
        // manta_write_effectors(this);                         // TODO in 
Mantaflow

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to