Commit: 6cf9f1e525ec892d69eba994f026898df4d650c2
Author: Sebastián Barschkis
Date:   Sat Apr 6 18:14:53 2019 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB6cf9f1e525ec892d69eba994f026898df4d650c2

Mantaflow: Cleanup debug output and some refactoring

No need to have huge debug output enabled

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

M       intern/mantaflow/intern/FLUID.cpp
M       intern/mantaflow/intern/FLUID.h

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

diff --git a/intern/mantaflow/intern/FLUID.cpp 
b/intern/mantaflow/intern/FLUID.cpp
index 4fb435cf81c..fddd87cd575 100644
--- a/intern/mantaflow/intern/FLUID.cpp
+++ b/intern/mantaflow/intern/FLUID.cpp
@@ -50,7 +50,7 @@
 
 std::atomic<bool> FLUID::mantaInitialized(false);
 std::atomic<int> FLUID::solverID(0);
-int FLUID::with_debug(1);
+int FLUID::with_debug(0);
 
 FLUID::FLUID(int *res, SmokeModifierData *smd) : mCurrentID(++solverID)
 {
@@ -192,7 +192,7 @@ FLUID::FLUID(int *res, SmokeModifierData *smd) : 
mCurrentID(++solverID)
                        mResXMesh       = mUpresMesh * mResX;
                        mResYMesh       = mUpresMesh * mResY;
                        mResZMesh       = mUpresMesh * mResZ;
-                       mTotalCellsMesh = mResXMesh * mResYMesh * mResZMesh;
+                       mTotalCellsMesh = mResXMesh * mResYMesh * mResZMesh;
 
                        // Initialize Mantaflow variables in Python
                        initMesh(smd);
@@ -230,7 +230,7 @@ FLUID::FLUID(int *res, SmokeModifierData *smd) : 
mCurrentID(++solverID)
                        mResXNoise      = amplify * mResX;
                        mResYNoise      = amplify * mResY;
                        mResZNoise      = amplify * mResZ;
-                       mTotalCellsHigh = mResXNoise * mResYNoise * mResZNoise;
+                       mTotalCellsHigh = mResXNoise * mResYNoise * mResZNoise;
                        
                        // Initialize Mantaflow variables in Python
                        initNoise(smd);
@@ -548,8 +548,8 @@ FLUID::~FLUID()
        tmpString += manta_import;
        tmpString += fluid_delete_all;
 
-       // Safe to pass NULL argument since only looking up IDs
-       std::string finalString = parseScript(tmpString, NULL);
+       // Leave out smd argument in parseScript since only looking up IDs
+       std::string finalString = parseScript(tmpString);
        pythonCommands.push_back(finalString);
        runPythonString(pythonCommands);
 }
diff --git a/intern/mantaflow/intern/FLUID.h b/intern/mantaflow/intern/FLUID.h
index 46969964a81..b609f9b53c4 100644
--- a/intern/mantaflow/intern/FLUID.h
+++ b/intern/mantaflow/intern/FLUID.h
@@ -361,7 +361,7 @@ private:
        void runPythonString(std::vector<std::string> commands);
        std::string getRealValue(const std::string& varName, SmokeModifierData 
*smd);
        std::string parseLine(const std::string& line, SmokeModifierData *smd);
-       std::string parseScript(const std::string& setup_string, 
SmokeModifierData *smd);
+       std::string parseScript(const std::string& setup_string, 
SmokeModifierData *smd=NULL);
        void updateMeshFromBobj(const char* filename);
        void updateMeshFromObj(const char* filename);
        void updateMeshFromUni(const char* filename);

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

Reply via email to