Fix issue reloading plugins

This commit is contained in:
Seth Hillbrand 2021-04-21 17:31:50 -07:00
parent 24f6cc99fa
commit 68a5d5dc01
1 changed files with 4 additions and 2 deletions

View File

@ -102,10 +102,12 @@ int SCRIPTING_TOOL::reloadPlugins( const TOOL_EVENT& aEvent )
{ {
PyLOCK lock; PyLOCK lock;
std::string sys_path = SCRIPTING::PyScriptingPath( false ).ToStdString();
std::string user_path = SCRIPTING::PyScriptingPath( true ).ToStdString();
using namespace pybind11::literals; using namespace pybind11::literals;
auto locals = pybind11::dict( "sys_path"_a = SCRIPTING::PyScriptingPath( false ), auto locals = pybind11::dict( "sys_path"_a = sys_path,
"user_path"_a = SCRIPTING::PyScriptingPath( true ) ); "user_path"_a = user_path );
pybind11::exec( R"( pybind11::exec( R"(
import sys import sys