diff --git a/Plugin/src/SofaPython3/PythonEnvironment.cpp b/Plugin/src/SofaPython3/PythonEnvironment.cpp index b79c897c0..2f5f5c19f 100644 --- a/Plugin/src/SofaPython3/PythonEnvironment.cpp +++ b/Plugin/src/SofaPython3/PythonEnvironment.cpp @@ -606,8 +606,9 @@ void PythonEnvironment::setArguments(const std::string& filename, const std::vec PySys_SetArgvEx( data->size(), data->getDataBuffer(), 0); } -void PythonEnvironment::SceneLoaderListerner::rightBeforeLoadingScene() +void PythonEnvironment::SceneLoaderListerner::rightBeforeLoadingScene(SceneLoader* sceneLoader) { + SOFA_UNUSED(sceneLoader); // unload python modules to force importing their eventual modifications executePython([]{ PyRun_SimpleString("SofaRuntime.unloadModules()");}); } diff --git a/Plugin/src/SofaPython3/PythonEnvironment.h b/Plugin/src/SofaPython3/PythonEnvironment.h index b0dd5eecd..f9031a5f8 100644 --- a/Plugin/src/SofaPython3/PythonEnvironment.h +++ b/Plugin/src/SofaPython3/PythonEnvironment.h @@ -120,9 +120,8 @@ class SOFAPYTHON3_API PythonEnvironment /// to be able to react when a scene is loaded struct SceneLoaderListerner : public SceneLoader::Listener { - using SceneLoader::Listener::rightBeforeLoadingScene; /// possibly unload python modules to force importing their eventual modifications - virtual void rightBeforeLoadingScene(); + void rightBeforeLoadingScene(SceneLoader* sceneLoader) override; static SceneLoaderListerner* getInstance() { static SceneLoaderListerner sceneLoaderListerner; return &sceneLoaderListerner; }