Browse Source

expose igl.glfw.Viewer.core() the same way as in C++ and adding default argument.

Nico Brügel 6 years ago
parent
commit
7162dbe428
1 changed files with 1 additions and 0 deletions
  1. 1 0
      python/modules/py_igl_opengl_glfw.cpp

+ 1 - 0
python/modules/py_igl_opengl_glfw.cpp

@@ -373,6 +373,7 @@ py::class_<igl::opengl::ViewerCore> viewercore_class(me, "ViewerCore");
     .def("data", (igl::opengl::ViewerData & (igl::opengl::glfw::Viewer::*)(int)) &igl::opengl::glfw::Viewer::data,pybind11::return_value_policy::reference)
     // .def("data", (const igl::opengl::ViewerData & (igl::opengl::glfw::Viewer::*)(int) const) &igl::opengl::glfw::Viewer::data,pybind11::return_value_policy::reference)
 
+    .def("core", (igl::opengl::ViewerCore & (igl::opengl::glfw::Viewer::*)(unsigned)) &igl::opengl::glfw::Viewer::core, pybind11::return_value_policy::reference, py::arg("core_id")=0)
     //.def_readwrite("core", &igl::opengl::glfw::Viewer::core)
     //.def_readwrite("opengl", &igl::opengl::glfw::Viewer::opengl)