[Bf-blender-cvs] [976ddc6] fluid-mantaflow: new manta script file to hold shared snippets for smoke and liquids (e.g. imports, solver object)

Sebastián Barschkis noreply at git.blender.org
Mon May 23 23:45:50 CEST 2016


Commit: 976ddc66367b911344ff7f927a9e6ef01c5b1c49
Author: Sebastián Barschkis
Date:   Wed May 11 12:45:01 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB976ddc66367b911344ff7f927a9e6ef01c5b1c49

new manta script file to hold shared snippets for smoke and liquids (e.g. imports, solver object)

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

M	intern/mantaflow/intern/LIQUID.cpp
M	intern/mantaflow/intern/SMOKE.cpp
M	intern/mantaflow/intern/strings/liquid_script.h
A	intern/mantaflow/intern/strings/shared_script.h
M	intern/mantaflow/intern/strings/smoke_script.h

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

diff --git a/intern/mantaflow/intern/LIQUID.cpp b/intern/mantaflow/intern/LIQUID.cpp
index 8834544..1d1d7b9 100644
--- a/intern/mantaflow/intern/LIQUID.cpp
+++ b/intern/mantaflow/intern/LIQUID.cpp
@@ -34,6 +34,7 @@
 #include "LIQUID.h"
 #include "registry.h"
 #include "liquid_script.h"
+#include "shared_script.h"
 
 bool LIQUID::mantaInitialized = false;
 
diff --git a/intern/mantaflow/intern/SMOKE.cpp b/intern/mantaflow/intern/SMOKE.cpp
index f0c637d..07d4cca 100644
--- a/intern/mantaflow/intern/SMOKE.cpp
+++ b/intern/mantaflow/intern/SMOKE.cpp
@@ -33,6 +33,7 @@
 
 #include "SMOKE.h"
 #include "registry.h"
+#include "shared_script.h"
 #include "smoke_script.h"
 
 #include "BLI_path_util.h"
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index ec5dd74..1c637b9 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -33,10 +33,6 @@
 // GENERAL SETUP
 //////////////////////////////////////////////////////////////////////
 
-const std::string manta_import = "\
-from manta import *\n\
-import os, shutil, math, sys, gc\n";
-
 const std::string liquid_flags = "\n\
 narrowBand = False\n";
 
diff --git a/intern/mantaflow/intern/strings/shared_script.h b/intern/mantaflow/intern/strings/shared_script.h
new file mode 100644
index 0000000..2ac8aa6
--- /dev/null
+++ b/intern/mantaflow/intern/strings/shared_script.h
@@ -0,0 +1,34 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version. 
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2016 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Sebastian Barschkis (sebbas)
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file mantaflow/intern/strings/shared_script.h
+ *  \ingroup mantaflow
+ */
+
+#include <string>
+
+const std::string manta_import = "\
+from manta import *\n\
+import os, shutil, math, sys, gc\n";
\ No newline at end of file
diff --git a/intern/mantaflow/intern/strings/smoke_script.h b/intern/mantaflow/intern/strings/smoke_script.h
index a9bfe9a..484af7d 100644
--- a/intern/mantaflow/intern/strings/smoke_script.h
+++ b/intern/mantaflow/intern/strings/smoke_script.h
@@ -33,12 +33,8 @@
 // GENERAL SETUP
 //////////////////////////////////////////////////////////////////////
 
-const std::string manta_import = "\
-from manta import *\n\
-import os, shutil, math, sys, gc\n";
-
 const std::string flags = "\n\
-using_colors = $USING_COLORS$\n\
+using_colors   = $USING_COLORS$\n\
 using_heat     = $USING_HEAT$\n\
 using_fire     = $USING_FIRE$\n\
 using_wavelets = $USE_WAVELETS$\n";




More information about the Bf-blender-cvs mailing list