1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-26 12:08:52 -05:00

python add overload fix

This commit is contained in:
hrocho 2020-11-29 13:49:39 +01:00
parent 77ab424c15
commit fbe4fffecd

View File

@ -146,7 +146,8 @@ PYBIND11_MODULE(pycatima,m){
py::class_<Layers>(m,"Layers")
.def(py::init<>(),"constructor")
.def("add",&Layers::add)
.def("add",py::overload_cast<Material>(&Layers::add))
.def("add_layers",py::overload_cast<const Layers&>(&Layers::add))
.def("num",&Layers::num)
// .def("__getitem__",&Layers::operator[], py::is_operator())
.def("__getitem__",[](Layers &r, int i)->Material*