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:
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c16
1 files changed, 16 insertions, 0 deletions
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;