Due to the changes in glfw::Viewer one should pass a parameter when calling data() to select a mesh. In C++ mesh_id=-1 by default ( the last element). This commit adds this behaviour for the python bindings.

This commit is contained in:
BruegelN
2019-06-10 19:51:26 +02:00
parent 16b8ab326c
commit ea48d38056
+1 -1
View File
@@ -370,7 +370,7 @@ py::class_<igl::opengl::ViewerCore> viewercore_class(me, "ViewerCore");
// viewer.data() = data;
// })
.def("data", (igl::opengl::ViewerData & (igl::opengl::glfw::Viewer::*)(int)) &igl::opengl::glfw::Viewer::data,pybind11::return_value_policy::reference)
.def("data", (igl::opengl::ViewerData & (igl::opengl::glfw::Viewer::*)(int)) &igl::opengl::glfw::Viewer::data, pybind11::return_value_policy::reference, py::arg("mesh_id")=-1)
// .def("data", (const igl::opengl::ViewerData & (igl::opengl::glfw::Viewer::*)(int) const) &igl::opengl::glfw::Viewer::data,pybind11::return_value_policy::reference)
//.def_readwrite("core", &igl::opengl::glfw::Viewer::core)