From 3842ed8f76702193b7cfb1ea96c18e8218f5bd5f Mon Sep 17 00:00:00 2001 From: fxia22 Date: Thu, 29 Aug 2019 22:35:12 -0700 Subject: [PATCH] add material_id --- python/bindings.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/python/bindings.cc b/python/bindings.cc index 32f1363d..369bb33c 100644 --- a/python/bindings.cc +++ b/python/bindings.cc @@ -116,6 +116,7 @@ PYBIND11_MODULE(tinyobjloader, tobj_module) py::class_(tobj_module, "mesh_t") .def(py::init<>()) .def_readonly("indices", &mesh_t::indices) + .def_readonly("material_ids", &mesh_t::material_ids) .def("numpy_indices", [] (mesh_t &instance) { auto ret = py::array_t(instance.indices.size() * 3); py::buffer_info buf = ret.request();