[Bf-blender-cvs] [5b98fce] fluid-mantaflow: removed old liquid files (not needed anymore)

Sebastián Barschkis noreply at git.blender.org
Sat Aug 6 13:01:00 CEST 2016


Commit: 5b98fce170a77a1552fd7693c10ae2be58560a1b
Author: Sebastián Barschkis
Date:   Tue Jul 26 14:19:10 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB5b98fce170a77a1552fd7693c10ae2be58560a1b

removed old liquid files (not needed anymore)

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

M	intern/mantaflow/CMakeLists.txt
D	intern/mantaflow/extern/manta_liquid_API.h
D	intern/mantaflow/intern/LIQUID.cpp
D	intern/mantaflow/intern/LIQUID.h
D	intern/mantaflow/intern/manta_liquid_API.cpp
M	source/blender/editors/physics/physics_fluid.c

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

diff --git a/intern/mantaflow/CMakeLists.txt b/intern/mantaflow/CMakeLists.txt
index 4d68fa5..e603d22 100644
--- a/intern/mantaflow/CMakeLists.txt
+++ b/intern/mantaflow/CMakeLists.txt
@@ -41,17 +41,13 @@ set(INC_SYS
 )
 
 set(SRC
-	intern/manta_liquid_API.cpp
 	intern/manta_python_API.cpp
 	intern/manta_smoke_API.cpp
-	intern/LIQUID.cpp
 	intern/SMOKE.cpp
 	intern/spectrum.cpp
 
-	extern/manta_liquid_API.h
 	extern/manta_python_API.h
 	extern/manta_smoke_API.h
-	intern/LIQUID.h
 	intern/SMOKE.h
 	intern/spectrum.h
 	intern/strings/shared_script.h
diff --git a/intern/mantaflow/extern/manta_liquid_API.h b/intern/mantaflow/extern/manta_liquid_API.h
deleted file mode 100644
index 5da61c4..0000000
--- a/intern/mantaflow/extern/manta_liquid_API.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * ***** 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/extern/manta_liquid_API.h
- *  \ingroup mantaflow
- */
-
-#ifndef MANTA_LIQUID_API_H_
-#define MANTA_LIQUID_API_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct LIQUID;
-struct LIQUID *liquid_init();
-void liquid_step(struct LIQUID *liquid, int currentFrame);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* MANTA_LIQUID_API_H_ */
\ No newline at end of file
diff --git a/intern/mantaflow/intern/LIQUID.cpp b/intern/mantaflow/intern/LIQUID.cpp
deleted file mode 100644
index c4ffcd2..0000000
--- a/intern/mantaflow/intern/LIQUID.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * ***** 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/LIQUID.cpp
- *  \ingroup mantaflow
- */
-
-#include <sstream>
-#include <fstream>
-#include <iostream>
-
-#include "LIQUID.h"
-#include "registry.h"
-#include "liquid_script.h"
-#include "shared_script.h"
-
-bool LIQUID::mantaInitialized = false;
-
-LIQUID::LIQUID()
-{
-	std::cout << "LIQUID" << std::endl;
-	
-	// Only start Mantaflow once. No need to start whenever new MANTA objected is allocated
-	if (!mantaInitialized)
-		startMantaflow();
-
-	initSetup();
-}
-
-void LIQUID::initSetup()
-{
-	std::string tmpString = manta_import
-		+ solver_low
-		+ adaptive_time_stepping_low
-		+ alloc_liquid
-		+ liquid_variables
-		+ prep_domain
-		+ adaptive_step_liquid
-		+ liquid_step;
-//	std::string finalString = parseScript(tmpString, smd);
-	mCommands.clear();
-	mCommands.push_back(tmpString);
-	
-	runPythonString(mCommands);
-}
-
-void LIQUID::step(int currentFrame)
-{
-	// Run manta step and handover current frame number
-	mCommands.clear();
-	std::ostringstream manta_step;
-	manta_step <<  "manta_step(" << currentFrame << ")";
-	mCommands.push_back(manta_step.str());
-	
-	runPythonString(mCommands);
-}
-
-LIQUID::~LIQUID()
-{
-	std::cout << "~LIQUID()" << std::endl;
-}
-
-void LIQUID::runPythonString(std::vector<std::string> commands)
-{
-	PyGILState_STATE gilstate = PyGILState_Ensure();
-	for (std::vector<std::string>::iterator it = commands.begin(); it != commands.end(); ++it) {
-		std::string command = *it;
-		PyRun_SimpleString(command.c_str());
-	}
-	PyGILState_Release(gilstate);
-}
-
-void LIQUID::startMantaflow()
-{
-	std::cout << "Starting mantaflow" << std::endl;
-	std::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();
-	Pb::setup(filename, fill);  // Namespace from Mantaflow (registry)
-	PyGILState_Release(gilstate);
-	mantaInitialized = true;
-}
-
diff --git a/intern/mantaflow/intern/LIQUID.h b/intern/mantaflow/intern/LIQUID.h
deleted file mode 100644
index 6c32d21..0000000
--- a/intern/mantaflow/intern/LIQUID.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * ***** 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/LIQUID.h
- *  \ingroup mantaflow
- */
-
-#ifndef LIQUID_H
-#define LIQUID_H
-
-#include <string>
-#include <vector>
-
-#include "Python.h"
-
-struct LIQUID {
-public:
-	LIQUID();
-	virtual ~LIQUID();
-	
-	void step(int currentFrame);
-	
-	static bool mantaInitialized;
-
-private:
-	std::vector<std::string> mCommands;
-
-	void initSetup();
-	void startMantaflow();
-	void runPythonString(std::vector<std::string> commands);
-};
-
-#endif
\ No newline at end of file
diff --git a/intern/mantaflow/intern/manta_liquid_API.cpp b/intern/mantaflow/intern/manta_liquid_API.cpp
deleted file mode 100644
index b697633..0000000
--- a/intern/mantaflow/intern/manta_liquid_API.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * ***** 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/manta_liquid_API.cpp
- *  \ingroup mantaflow
- */
-
-#include "LIQUID.h"
-#include "manta_liquid_API.h"
-
-extern "C" LIQUID *liquid_init()
-{
-	LIQUID *liquid = new LIQUID();
-	return liquid;
-}
-
-extern "C" void liquid_step(LIQUID *liquid, int currentFrame)
-{
-	liquid->step(currentFrame);
-}
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 66eb9cf..038e2ff 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -71,7 +71,6 @@
 	#include "../../../../intern/smoke/extern/smoke_API.h"
 #else
 	#include "../../../../intern/mantaflow/extern/manta_smoke_API.h"
-	#include "../../../../intern/mantaflow/extern/manta_liquid_API.h"
 #endif
 #include "DNA_smoke_types.h"




More information about the Bf-blender-cvs mailing list