From 4fdbabdf76d36fc6181f3e030e70738ab5f0c615 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 27 Nov 2020 07:36:28 -0500 Subject: [PATCH] Revert "Fix libffi not found" --- src/runner/pythonrunner.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index d482124..0924e7f 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1254,10 +1254,8 @@ bool PythonRunner::initPython(const QString &pythonPath) PySys_SetArgv(0, (wchar_t**)&argBuffer); - auto os = bpy::import("os"); - auto mainModule = bpy::import("__main__"); - auto mainNamespace = mainModule.attr("__dict__"); - mainNamespace["os"] = os; + bpy::object mainModule = bpy::import("__main__"); + bpy::object mainNamespace = mainModule.attr("__dict__"); mainNamespace["sys"] = bpy::import("sys"); mainNamespace["moprivate"] = bpy::import("moprivate"); mainNamespace["mobase"] = bpy::import("mobase"); @@ -1267,10 +1265,6 @@ bool PythonRunner::initPython(const QString &pythonPath) "sys.excepthook = lambda x, y, z: sys.__excepthook__(x, y, z)\n", mainNamespace); - // add dlls directory - const auto dlls = QCoreApplication::applicationDirPath().toStdString() + "/dlls"; - os.attr("add_dll_directory")(dlls); - configure_python_logging(mainNamespace["mobase"]); PyEval_SaveThread();