File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,8 @@ using sofa::core::objectmodel::Event;
4545
4646#include < sofa/defaulttype/DataTypeInfo.h>
4747
48+ #include < pybind11/eigen.h>
49+
4850SOFAPYTHON3_BIND_ATTRIBUTE_ERROR ()
4951
5052// / Makes an alias for the pybind11 namespace to increase readability.
@@ -196,6 +198,10 @@ py::object PythonFactory::valueToPython_ro(sofa::core::objectmodel::BaseData* da
196198 a.attr (" flags" ).attr (" writeable" ) = false ;
197199 return std::move (a);
198200 }
201+ if (auto p = dynamic_cast <sofa::core::objectmodel::Data<Eigen::MatrixXf>*>(data)){
202+ const auto matrice = p->getValue ();
203+ return py::cast (matrice);
204+ }
199205
200206 // / If this is not the case we return the converted datas (copy)
201207 return convertToPython (data);
You can’t perform that action at this time.
0 commit comments