PKGBUILDs/extra/blender/blender-4.11-mantaflow-python-3.12.patch
2024-05-24 12:49:15 +00:00

14 lines
678 B
Diff

diff --git a/extern/mantaflow/helper/pwrapper/registry.cpp b/extern/mantaflow/helper/pwrapper/registry.cpp
index b4206a41dea..bd83eb28116 100644
--- a/extern/mantaflow/helper/pwrapper/registry.cpp
+++ b/extern/mantaflow/helper/pwrapper/registry.cpp
@@ -576,7 +576,8 @@ void WrapperRegistry::construct(const string &scriptname, const vector<string> &
registerDummyTypes();
// work around for certain gcc versions, cast to char*
- PyImport_AppendInittab((char *)gDefaultModuleName.c_str(), PyInit_manta_main);
+ if (!Py_IsInitialized())
+ PyImport_AppendInittab((char *)gDefaultModuleName.c_str(), PyInit_manta_main);
}
inline PyObject *castPy(PyTypeObject *p)