blender-4.11-mantaflow-python-3.12.patch 678 B

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