diff --git a/src/canorus.cpp b/src/canorus.cpp index 3e782e7c..bd0ceb9e 100644 --- a/src/canorus.cpp +++ b/src/canorus.cpp @@ -74,6 +74,9 @@ void CACanorus::initSearchPaths() if (cat == "fonts" && QDir(qApp->applicationDirPath() + "/../../src/fonts/").exists()) { QDir::addSearchPath(cat, qApp->applicationDirPath() + "/../../src/fonts/"); } + if (cat == "scripts" && QDir(qApp->applicationDirPath() + "/../../src/scripts/").exists()) { + QDir::addSearchPath(cat, qApp->applicationDirPath() + "/../../src/scripts/"); + } if (cat == "doc" && QDir(qApp->applicationDirPath()).exists("/../../doc/")) { QDir::addSearchPath(cat, qApp->applicationDirPath() + "/../../doc"); } diff --git a/src/scripting/swigpython.cpp b/src/scripting/swigpython.cpp index 9cb395c5..d37a6f8b 100644 --- a/src/scripting/swigpython.cpp +++ b/src/scripting/swigpython.cpp @@ -78,6 +78,9 @@ void CASwigPython::init() } #endif + // Load proxy classes. + PyRun_SimpleString("import CanorusPython"); + mainThreadState = PyThreadState_Get(); PyEval_ReleaseThread(mainThreadState); @@ -126,6 +129,8 @@ PyObject* CASwigPython::callFunction(QString fileName, QString function, QList
parent();
PyEval_RestoreThread(CASwigPython::mainThreadState);
argsPython << CASwigPython::toPythonObject(static_cast