Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2019-12-16 17:50:14 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2019-12-16 18:37:01 +0300
commitd27ccf990c2b957a10f4676e3153f907829a4b22 (patch)
tree48667db9d5f51e3c951cb1106566a53db21d9adf /source/blender/python
parent7b87d3d34ec5bbaf777bdc27abdb69600915fce1 (diff)
Mantaflow [Part 6]: Updates in /blender/source
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming. Reviewed By: sergey Maniphest Tasks: T59995 Differential Revision: https://developer.blender.org/D3855
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/intern/CMakeLists.txt9
-rw-r--r--source/blender/python/intern/bpy_app_build_options.c21
-rw-r--r--source/blender/python/intern/bpy_interface.c16
3 files changed, 26 insertions, 20 deletions
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index d5f0e2fb863..012492fe9a7 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -33,6 +33,7 @@ set(INC
../../windowmanager
../../../../intern/clog
../../../../intern/guardedalloc
+ ../../../../intern/mantaflow/extern
../../../../intern/opencolorio
)
@@ -257,10 +258,6 @@ if(WITH_LIBMV)
add_definitions(-DWITH_LIBMV)
endif()
-if(WITH_MOD_FLUID)
- add_definitions(-DWITH_MOD_FLUID)
-endif()
-
if(WITH_MOD_OCEANSIM)
add_definitions(-DWITH_OCEANSIM)
endif()
@@ -269,8 +266,8 @@ if(WITH_MOD_REMESH)
add_definitions(-DWITH_MOD_REMESH)
endif()
-if(WITH_MOD_SMOKE)
- add_definitions(-DWITH_SMOKE)
+if(WITH_MOD_FLUID)
+ add_definitions(-DWITH_FLUID)
endif()
if(WITH_OPENCOLLADA)
diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c
index ee6a3fd41d8..7d2645e7776 100644
--- a/source/blender/python/intern/bpy_app_build_options.c
+++ b/source/blender/python/intern/bpy_app_build_options.c
@@ -51,16 +51,15 @@ static PyStructSequence_Field app_builtopts_info_fields[] = {
{(char *)"sdl_dynload", NULL},
{(char *)"jack", NULL},
{(char *)"libmv", NULL},
- {(char *)"mod_fluid", NULL},
{(char *)"mod_oceansim", NULL},
{(char *)"mod_remesh", NULL},
- {(char *)"mod_smoke", NULL},
{(char *)"collada", NULL},
{(char *)"opencolorio", NULL},
{(char *)"openmp", NULL},
{(char *)"openvdb", NULL},
{(char *)"alembic", NULL},
{(char *)"usd", NULL},
+ {(char *)"fluid", NULL},
{NULL},
};
@@ -222,12 +221,6 @@ static PyObject *make_builtopts_info(void)
SetObjIncref(Py_False);
#endif
-#ifdef WITH_MOD_FLUID
- SetObjIncref(Py_True);
-#else
- SetObjIncref(Py_False);
-#endif
-
#ifdef WITH_OCEANSIM
SetObjIncref(Py_True);
#else
@@ -240,12 +233,6 @@ static PyObject *make_builtopts_info(void)
SetObjIncref(Py_False);
#endif
-#ifdef WITH_SMOKE
- SetObjIncref(Py_True);
-#else
- SetObjIncref(Py_False);
-#endif
-
#ifdef WITH_COLLADA
SetObjIncref(Py_True);
#else
@@ -282,6 +269,12 @@ static PyObject *make_builtopts_info(void)
SetObjIncref(Py_False);
#endif
+#ifdef WITH_FLUID
+ SetObjIncref(Py_True);
+#else
+ SetObjIncref(Py_False);
+#endif
+
#undef SetObjIncref
return builtopts_info;
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 2b9556e998a..bbf9b03cdd7 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -197,8 +197,15 @@ void BPY_context_set(bContext *C)
BPy_SetContext(C);
}
+#ifdef WITH_FLUID
+/* defined in manta module */
+extern PyObject *Manta_initPython(void);
+#endif
+
+#ifdef WITH_AUDASPACE
/* defined in AUD_C-API.cpp */
extern PyObject *AUD_initPython(void);
+#endif
#ifdef WITH_CYCLES
/* defined in cycles module */
@@ -225,6 +232,9 @@ static struct _inittab bpy_internal_modules[] = {
{"bmesh.utils", BPyInit_bmesh_utils},
{"bmesh.utils", BPyInit_bmesh_geometry},
#endif
+#ifdef WITH_FLUID
+ {"manta", Manta_initPython},
+#endif
#ifdef WITH_AUDASPACE
{"aud", AUD_initPython},
#endif
@@ -285,6 +295,12 @@ void BPY_python_start(int argc, const char **argv)
/* Initialize thread support (also acquires lock) */
PyEval_InitThreads();
+
+ /* (sebbas): Required to prevent assertion error */
+ /* see:
+ * https://stackoverflow.com/questions/27844676/assertionerror-3-x-only-when-calling-py-finalize-with-threads
+ */
+ Py_DECREF(PyImport_ImportModule("threading"));
#else
(void)argc;
(void)argv;