diff --git a/CMakeLists.txt b/CMakeLists.txt index bac27375a6b7e64727eaba89aa7db2850e3df8db..328be5b077fe4578c64655d50dd62cfd7b6e1218 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,7 @@ SET(${PROJECT_NAME}_HEADERS include/eigenpy/fwd.hpp include/eigenpy/eigen-allocator.hpp include/eigenpy/eigen-to-python.hpp + include/eigenpy/eigen-from-python.hpp include/eigenpy/map.hpp include/eigenpy/geometry.hpp include/eigenpy/geometry-conversion.hpp diff --git a/include/eigenpy/details.hpp b/include/eigenpy/details.hpp index b29878b4dd49b3e4255bb115fb7c9f5817d8df2b..699afb4171fdc7d097170abc7f9e538df42838e0 100644 --- a/include/eigenpy/details.hpp +++ b/include/eigenpy/details.hpp @@ -304,6 +304,7 @@ namespace eigenpy } }; +#endif template<typename MatType,typename EigenEquivalentType> EIGENPY_DEPRECATED @@ -317,7 +318,7 @@ namespace eigenpy { if(check_registration<MatType>()) return; - bp::to_python_converter<MatType,EigenToPy<MatType> >(); + EigenToPyConverter<MatType>::registration(); EigenFromPyConverter<MatType>::registration(); } diff --git a/include/eigenpy/eigen-to-python.hpp b/include/eigenpy/eigen-to-python.hpp index 6c343f2d4a590770393f7e506562eb094a7c2b17..0696eea1336409f01e68ead16cc99a728027c652 100644 --- a/include/eigenpy/eigen-to-python.hpp +++ b/include/eigenpy/eigen-to-python.hpp @@ -47,6 +47,24 @@ namespace eigenpy } }; + template<typename MatType> + struct EigenToPyConverter + { + static void registration() + { + bp::to_python_converter<MatType,EigenToPy<MatType> >(); + } + }; + +#if EIGEN_VERSION_AT_LEAST(3,2,0) + template<typename MatType> + struct EigenToPyConverter< eigenpy::Ref<MatType> > + { + static void registration() + { + } + }; +#endif } #endif // __eigenpy_eigen_to_python_hpp__