diff --git a/src/proxy/proxypython.cpp b/src/proxy/proxypython.cpp index fe3886f..eb9aa90 100644 --- a/src/proxy/proxypython.cpp +++ b/src/proxy/proxypython.cpp @@ -110,7 +110,7 @@ ProxyPython::~ProxyPython() } } -typedef IPythonRunner* (*CreatePythonRunner_func)(const MOBase::IOrganizer *moInfo, const QString &pythonPath); +typedef IPythonRunner* (*CreatePythonRunner_func)(const QString &pythonPath); bool ProxyPython::init(IOrganizer *moInfo) @@ -170,7 +170,7 @@ bool ProxyPython::init(IOrganizer *moInfo) m_MOInfo->setPersistent(name(), "tryInit", true); } - m_Runner = CreatePythonRunner(moInfo, pythonPath); + m_Runner = CreatePythonRunner(pythonPath); if (m_MOInfo) { m_MOInfo->setPersistent(name(), "tryInit", false); diff --git a/src/runner/pythonrunner.cpp b/src/runner/pythonrunner.cpp index bc733cc..0b27d2c 100644 --- a/src/runner/pythonrunner.cpp +++ b/src/runner/pythonrunner.cpp @@ -1035,7 +1035,7 @@ class PythonRunner : public IPythonRunner { public: - PythonRunner(const MOBase::IOrganizer* moInfo); + PythonRunner(); bool initPython(const QString& pythonDir); QList instantiate(const QString& pluginName); bool isPythonInstalled() const; @@ -1066,13 +1066,12 @@ private: // List of python objects representing plugins to keep all the bpy::object "alive" // during the execution. std::vector m_PythonObjects; - const MOBase::IOrganizer* m_MOInfo; wchar_t* m_PythonHome; }; -IPythonRunner* CreatePythonRunner(MOBase::IOrganizer* moInfo, const QString& pythonDir) +IPythonRunner* CreatePythonRunner(const QString& pythonDir) { - PythonRunner* result = new PythonRunner(moInfo); + PythonRunner* result = new PythonRunner; if (result->initPython(pythonDir)) { return result; } @@ -1082,8 +1081,7 @@ IPythonRunner* CreatePythonRunner(MOBase::IOrganizer* moInfo, const QString& pyt } } -PythonRunner::PythonRunner(const MOBase::IOrganizer *moInfo) - : m_MOInfo(moInfo) +PythonRunner::PythonRunner() { m_PythonHome = new wchar_t[MAX_PATH + 1]; } diff --git a/src/runner/pythonrunner.h b/src/runner/pythonrunner.h index ae5d620..73de994 100644 --- a/src/runner/pythonrunner.h +++ b/src/runner/pythonrunner.h @@ -22,7 +22,7 @@ public: #define PYDLLEXPORT Q_DECL_IMPORT #endif // PYTHONRUNNER_LIBRARY -extern "C" PYDLLEXPORT IPythonRunner *CreatePythonRunner(MOBase::IOrganizer *moInfo, const QString &pythonDir); +extern "C" PYDLLEXPORT IPythonRunner *CreatePythonRunner(const QString &pythonDir);