Skip to content

Commit 4a00b6e

Browse files
authored
add binding to unload a plugin (#439)
1 parent f35a78a commit 4a00b6e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

bindings/SofaRuntime/src/SofaPython3/SofaRuntime/Module_SofaRuntime.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ PYBIND11_MODULE(SofaRuntime, m) {
159159
return simpleapi::importPlugin(name);
160160
}, "import a sofa plugin into the current environment");
161161

162+
m.def("unload_plugin", [](const std::string& name)
163+
{
164+
auto& pluginManager = sofa::helper::system::PluginManager::getInstance();
165+
pluginManager.unloadPlugin(name);
166+
}, "unload a sofa plugin");
167+
162168
m.def("load_plugins_from_ini_file", [](const std::string& iniFile)
163169
{
164170
auto& pluginManager = sofa::helper::system::PluginManager::getInstance();

0 commit comments

Comments
 (0)