From dfce3426dc80b9d7b994527cb4f504785ef34a4c Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Thu, 27 Aug 2026 17:26:04 +0200 Subject: [PATCH 1/3] Apply changes from PR #6266 --- bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Node.cpp b/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Node.cpp index 85d0de2b..743f04c4 100644 --- a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Node.cpp +++ b/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Node.cpp @@ -679,7 +679,7 @@ void moduleAddNode(py::module &m) { py_shared_ptr>(m, "BaseNode", "Base class for simulation node"); py::class_> + sofa::core::objectmodel::BaseContext, py_shared_ptr> p(m, "Node", sofapython3::doc::sofa::core::Node::Class); PythonFactory::registerType( From 7706a13e013e13d4d8413e60de41ea2840c00e08 Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Thu, 27 Aug 2026 17:26:04 +0200 Subject: [PATCH 2/3] Apply changes from PR #6266 --- bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp b/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp index 05058a71..d9f391e3 100644 --- a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp +++ b/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp @@ -18,7 +18,8 @@ * Contact information: contact@sofa-framework.org * ******************************************************************************/ -#include +#include +#include #include #include #include @@ -29,7 +30,7 @@ namespace py { using namespace pybind11; } namespace sofapython3 { void moduleAddContext(py::module& m) { - py::class_> (m, "Context", "Implementation of BaseContext, storing all shared parameters in Datas"); + py::class_> (m, "Context", "Implementation of BaseContext, storing all shared parameters in Datas"); } } // namespace sofapython3 From 9f62dc507046f7cfeb62b3a96db9582de43589f2 Mon Sep 17 00:00:00 2001 From: Damien Marchal Date: Thu, 3 Sep 2026 16:00:17 +0200 Subject: [PATCH 3/3] Remove Binding_Context --- .../SofaPython3/Sofa/Core/Binding_Context.cpp | 36 ------------------- .../SofaPython3/Sofa/Core/Binding_Context.h | 30 ---------------- .../src/SofaPython3/Sofa/Core/CMakeLists.txt | 2 -- .../SofaPython3/Sofa/Core/Submodule_Core.cpp | 2 -- 4 files changed, 70 deletions(-) delete mode 100644 bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp delete mode 100644 bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.h diff --git a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp b/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp deleted file mode 100644 index d9f391e3..00000000 --- a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/****************************************************************************** -* SofaPython3 plugin * -* (c) 2021 CNRS, University of Lille, INRIA * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Contact information: contact@sofa-framework.org * -******************************************************************************/ - -#include -#include -#include -#include -#include - -using namespace sofa::core::objectmodel; -namespace py { using namespace pybind11; } - -namespace sofapython3 { - -void moduleAddContext(py::module& m) { - py::class_> (m, "Context", "Implementation of BaseContext, storing all shared parameters in Datas"); -} - -} // namespace sofapython3 diff --git a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.h b/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.h deleted file mode 100644 index d56dee0c..00000000 --- a/bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Context.h +++ /dev/null @@ -1,30 +0,0 @@ -/****************************************************************************** -* SofaPython3 plugin * -* (c) 2021 CNRS, University of Lille, INRIA * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU Lesser General Public License as published by * -* the Free Software Foundation; either version 2.1 of the License, or (at * -* your option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but WITHOUT * -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * -* for more details. * -* * -* You should have received a copy of the GNU Lesser General Public License * -* along with this program. If not, see . * -******************************************************************************* -* Contact information: contact@sofa-framework.org * -******************************************************************************/ - -#pragma once - -#include - -namespace sofapython3 { - -void moduleAddContext(pybind11::module &m); - -} // namespace sofapython3 - diff --git a/bindings/Sofa/src/SofaPython3/Sofa/Core/CMakeLists.txt b/bindings/Sofa/src/SofaPython3/Sofa/Core/CMakeLists.txt index c688a9ea..d2db796b 100644 --- a/bindings/Sofa/src/SofaPython3/Sofa/Core/CMakeLists.txt +++ b/bindings/Sofa/src/SofaPython3/Sofa/Core/CMakeLists.txt @@ -14,7 +14,6 @@ set(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Binding_BaseContext.h ${CMAKE_CURRENT_SOURCE_DIR}/Binding_ContactListener.h ${CMAKE_CURRENT_SOURCE_DIR}/Binding_ContactListener_doc.h - ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Context.h ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Component.h ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Component.inl ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Component_doc.h @@ -70,7 +69,6 @@ set(SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Binding_BaseCamera.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Binding_BaseContext.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Binding_ContactListener.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Context.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Component.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Binding_Controller.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Binding_DataEngine.cpp diff --git a/bindings/Sofa/src/SofaPython3/Sofa/Core/Submodule_Core.cpp b/bindings/Sofa/src/SofaPython3/Sofa/Core/Submodule_Core.cpp index 390425c4..1f918c53 100644 --- a/bindings/Sofa/src/SofaPython3/Sofa/Core/Submodule_Core.cpp +++ b/bindings/Sofa/src/SofaPython3/Sofa/Core/Submodule_Core.cpp @@ -33,7 +33,6 @@ using sofa::helper::logging::Message; #include #include #include -#include #include #include #include @@ -142,7 +141,6 @@ PYBIND11_MODULE(Core, core) moduleAddBaseComponent(core); moduleAddBaseCamera(core); moduleAddContactListener(core); - moduleAddContext(core); moduleAddComponent(core); moduleAddController(core); moduleAddDataEngine(core);