Browse Source

python: make conversion from a mutable image view implicit.

pull/8/head
Vladimír Vondruš 7 years ago
parent
commit
432d424a77
  1. 2
      src/python/magnum/magnum.cpp

2
src/python/magnum/magnum.cpp

@ -113,6 +113,8 @@ template<class T> void imageView(py::class_<T, PyImageViewHolder<T>>& c) {
}
template<class T> void imageViewFromMutable(py::class_<T, PyImageViewHolder<T>>& c) {
py::implicitly_convertible<BasicMutableImageView<T::Dimensions>, T>();
c
.def(py::init([](const BasicMutableImageView<T::Dimensions>& other) {
return pyImageViewHolder(BasicImageView<T::Dimensions>(other), pyObjectHolderFor<PyImageViewHolder>(other).owner);

Loading…
Cancel
Save