@@ -72,23 +72,6 @@ using sofa::helper::logging::MainConsoleMessageHandler;
7272namespace sofapython3
7373{
7474
75-
76- class SofaInitializer
77- {
78- public:
79- // TODO, ces trucs sont fort laid. Normalement ce devrait être une joli plugin qui
80- // appelle le init.
81- SofaInitializer (){
82- sofa::simulation::common::init ();
83- sofa::simulation::graph::init ();
84- }
85-
86- ~SofaInitializer (){
87- sofa::simulation::common::cleanup ();
88- sofa::simulation::graph::cleanup ();
89- }
90- };
91-
9275static std::vector<std::string> getCategories (const std::string& className)
9376{
9477 std::vector<std::string> categories;
@@ -109,8 +92,6 @@ static std::vector<std::string> getCategories(const std::string& className)
10992 return categories ;
11093}
11194
112- static SofaInitializer s;
113-
11495// / The first parameter must be named the same as the module file to load.
11596PYBIND11_MODULE (SofaRuntime, m) {
11697
@@ -132,13 +113,6 @@ PYBIND11_MODULE(SofaRuntime, m) {
132113
133114 )doc" ;
134115
135- // These are needed to force the dynamic loading of module dependencies (found in CMakeLists.txt)
136- sofa::core::init ();
137- sofa::helper::init ();
138- sofa::simulation::core::init ();
139- sofa::simulation::graph::init ();
140- sofa::simulation::common::init ();
141-
142116 // Add the plugin directory to PluginRepository
143117 const std::string& pluginDir = Utils::getExecutableDirectory ();
144118 PluginRepository.addFirstPath (pluginDir);
@@ -198,6 +172,7 @@ PYBIND11_MODULE(SofaRuntime, m) {
198172 m.def (" getCategories" , &getCategories);
199173
200174 addSubmoduleTimer (m);
175+
201176}
202177
203178} // namespace sofapython3
0 commit comments