Commit: c1be8670b21e9925e64a80bfc919afaba64763d8
Author: Sebastián Barschkis
Date:   Sun Jan 17 23:05:31 2016 +0100
Branches: fluid-mantaflow
https://developer.blender.org/rBc1be8670b21e9925e64a80bfc919afaba64763d8

reverting to old mantaflow initialization

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

M       intern/smoke/intern/MANTA.cpp
M       intern/smoke/intern/MANTA.h

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

diff --git a/intern/smoke/intern/MANTA.cpp b/intern/smoke/intern/MANTA.cpp
index 0169bd9..a49065a 100644
--- a/intern/smoke/intern/MANTA.cpp
+++ b/intern/smoke/intern/MANTA.cpp
@@ -1,7 +1,7 @@
 #include "MANTA.h"
 #include "WTURBULENCE.h"
 #include "scenarios/smoke.h"
-#include "../../../source/blender/python/manta_pp/pwrapper/manta.h"
+//#include "../../../source/blender/python/manta_pp/pwrapper/manta.h"
 
 //extern "C" bool manta_check_grid_size(struct FLUID_3D *fluid, int dimX, int 
dimY, int dimZ)
 //{
@@ -401,19 +401,24 @@
 
 void Manta_API::start_mantaflow()
 {
-       string filename = "manta_scene.py";
-       std::vector<std::string> fill = std::vector<std::string>();
-       
-       // Initialize extension classes and wrappers
-       srand(0);
-       PyGILState_STATE gilstate = PyGILState_Ensure();
+//     string filename = "manta_scene.py";
+//     std::vector<std::string> fill = std::vector<std::string>();
+//     
+//     // Initialize extension classes and wrappers
+//     srand(0);
+//     PyGILState_STATE gilstate = PyGILState_Ensure();
+//     
+//     if (!manta_initialized)
+//     {       
+//             Pb::setup(filename, fill);
+//             manta_initialized = true;
+//     }
+//     PyGILState_Release(gilstate);
        
-       if (!manta_initialized)
-       {       
-               Pb::setup(filename, fill);
-               manta_initialized = true;
-       }
-       PyGILState_Release(gilstate);
+       // Using old initialization setup
+       vector<string> args;
+       args.push_back("manta_scene.py");
+       initializeMantaflow(args);
 }
 
 std::string Manta_API::get_real_value( const std::string& varName, 
SmokeModifierData *smd)
diff --git a/intern/smoke/intern/MANTA.h b/intern/smoke/intern/MANTA.h
index 1ca23b5..54b7edf 100644
--- a/intern/smoke/intern/MANTA.h
+++ b/intern/smoke/intern/MANTA.h
@@ -21,7 +21,7 @@
 //void export_force_fields(int size_x, int size_y, int size_z, float *f_x, 
float*f_y, float*f_z);/*defined in pymain.cpp*/
 //void export_em_fields(float *em_map, float flow_density, int min_x, int 
min_y, int min_z, int max_x, int max_y, int max_z, int d_x, int d_y, int d_z, 
float *inf, float *vel);/*defined in pymain.cpp*/
 //extern "C" void manta_write_effectors(struct FLUID_3D *fluid); /*defined in 
smoke_api.cpp*/
-//void initializeMantaflow(vector<string>& args);//defined in 
manta_pp/pwrapper/pymain.cpp
+void initializeMantaflow(vector<string>& args);//defined in 
manta_pp/pwrapper/pymain.cpp
 //void runScript(vector<string>& args);//defined in 
manta_pp/pwrapper/pymain.cpp
 
 namespace Manta_API {
@@ -46,8 +46,8 @@ namespace Manta_API {
 //     SmokeModifierData smd;
 //};
 
-static bool manta_sim_running = true;
-static bool manta_initialized = false;
+//static bool manta_sim_running = true;
+//static bool manta_initialized = false;
 
 //extern "C" bool manta_check_grid_size(struct FLUID_3D *fluid, int dimX, int 
dimY, int dimZ);
 //

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

Reply via email to