Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Component.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ Component_Trampoline::Component_Trampoline()
void Component_Trampoline::draw(const sofa::core::visual::VisualParams* params)
{
PythonEnvironment::executePython(this, [this, params](){
PYBIND11_OVERLOAD(void, Component, draw, params);
PYBIND11_OVERRIDE(void, Component, draw, params);
});
}

void Component_Trampoline::init()
{
PythonEnvironment::executePython(this, [this](){
initializePythonCache();
PYBIND11_OVERLOAD(void, Component, init, );
PYBIND11_OVERRIDE(void, Component, init, );
});
}

void Component_Trampoline::reinit()
{
PythonEnvironment::executePython(this, [this](){
PYBIND11_OVERLOAD(void, Component, reinit, );
PYBIND11_OVERRIDE(void, Component, reinit, );
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@ Controller_Trampoline::Controller_Trampoline()
void Controller_Trampoline::draw(const sofa::core::visual::VisualParams* params)
{
PythonEnvironment::executePython(this, [this, params](){
PYBIND11_OVERLOAD(void, Controller, draw, params);
PYBIND11_OVERRIDE(void, Controller, draw, params);
});
}

void Controller_Trampoline::init()
{
PythonEnvironment::executePython(this, [this](){
initializePythonCache();
PYBIND11_OVERLOAD(void, Controller, init, );
PYBIND11_OVERRIDE(void, Controller, init, );
});
}

void Controller_Trampoline::reinit()
{
PythonEnvironment::executePython(this, [this](){
PYBIND11_OVERLOAD(void, Controller, reinit, );
PYBIND11_OVERRIDE(void, Controller, reinit, );
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ std::string DataEngine_Trampoline::getClassName() const
void DataEngine_Trampoline::init()
{
PythonEnvironment::executePython(this, [this](){
PYBIND11_OVERLOAD(void, DataEngine, init, );
PYBIND11_OVERRIDE(void, DataEngine, init, );
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace sofapython3
if(!mstate.get())
throw py::type_error("Missing mechanical state.");

PYBIND11_OVERLOAD(void, ForceField<TDOFType>, init,);
PYBIND11_OVERRIDE(void, ForceField<TDOFType>, init,);
}

template<class TDOFType>
Expand All @@ -99,7 +99,7 @@ namespace sofapython3
"kFactor"_a=mparams->kFactor(),
"isImplicit"_a=mparams->implicit(),
"energy"_a=mparams->energy());
PYBIND11_OVERLOAD_PURE(void, ForceField<TDOFType>, addForce, mp, PythonFactory::toPython(&f), PythonFactory::toPython(&x), PythonFactory::toPython(&v));
PYBIND11_OVERRIDE_PURE(void, ForceField<TDOFType>, addForce, mp, PythonFactory::toPython(&f), PythonFactory::toPython(&x), PythonFactory::toPython(&v));
}

template<class TDOFType>
Expand All @@ -114,7 +114,7 @@ namespace sofapython3
"kFactor"_a=mparams->kFactor(),
"isImplicit"_a=mparams->implicit()
);
PYBIND11_OVERLOAD_PURE(void, ForceField<TDOFType>, addDForce, mp, PythonFactory::toPython(&df), PythonFactory::toPython(&dx));
PYBIND11_OVERRIDE_PURE(void, ForceField<TDOFType>, addDForce, mp, PythonFactory::toPython(&df), PythonFactory::toPython(&dx));
}


Expand All @@ -129,7 +129,7 @@ namespace sofapython3
"isImplicit"_a=mparams->implicit()
);

PYBIND11_OVERLOAD_PURE(py::object, ForceField<TDOFType>, addKToMatrix, mp, nIndices, nDofs);
PYBIND11_OVERRIDE_PURE(py::object, ForceField<TDOFType>, addKToMatrix, mp, nIndices, nDofs);
}

template<class TDOFType>
Expand Down
8 changes: 4 additions & 4 deletions bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace sofapython3
"isImplicit"_a=mparams->implicit(),
"energy"_a=mparams->energy());

PYBIND11_OVERLOAD_PURE(void, Inherit1, apply, mp,
PYBIND11_OVERRIDE_PURE(void, Inherit1, apply, mp,
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
}

Expand All @@ -108,7 +108,7 @@ namespace sofapython3
"isImplicit"_a=mparams->implicit(),
"energy"_a=mparams->energy());

PYBIND11_OVERLOAD_PURE(void, Inherit1, applyJ, mp,
PYBIND11_OVERRIDE_PURE(void, Inherit1, applyJ, mp,
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
}

Expand All @@ -123,7 +123,7 @@ namespace sofapython3
"isImplicit"_a=mparams->implicit(),
"energy"_a=mparams->energy());

PYBIND11_OVERLOAD_PURE(void, Inherit1, applyJT, mp,
PYBIND11_OVERRIDE_PURE(void, Inherit1, applyJT, mp,
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
}

Expand All @@ -135,7 +135,7 @@ namespace sofapython3

py::dict mp = py::dict("time"_a=getContext()->getTime());

PYBIND11_OVERLOAD_PURE(void, Inherit1, applyConstraintsJT, mp,
PYBIND11_OVERRIDE_PURE(void, Inherit1, applyConstraintsJT, mp,
PythonFactory::toPython(&out), PythonFactory::toPython(&in));
}

Expand Down
2 changes: 1 addition & 1 deletion bindings/Sofa/src/SofaPython3/Sofa/Core/Binding_Prefab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void Prefab_Trampoline::doReInit()
}
try{
this->d_componentState.setValue(sofa::core::objectmodel::ComponentState::Valid);
PYBIND11_OVERLOAD(void, Prefab, doReInit, );
PYBIND11_OVERRIDE(void, Prefab, doReInit, );
} catch (std::exception& e)
{
this->d_componentState.setValue(sofa::core::objectmodel::ComponentState::Invalid);
Expand Down
Loading