Commit 798fb1bf authored by T.J. Corona's avatar T.J. Corona

smtk::mesh::Resource: add missing python bindings

parent 47770bb8
......@@ -81,7 +81,7 @@ PYBIND11_MODULE(_smtkPybindMesh, mesh)
pybind11_init_smtk_mesh_FieldType(mesh);
PySharedPtrClass< smtk::mesh::CellForEach > smtk_mesh_CellForEach = pybind11_init_smtk_mesh_CellForEach(mesh);
PySharedPtrClass< smtk::mesh::CellSet > smtk_mesh_CellSet = pybind11_init_smtk_mesh_CellSet(mesh);
PySharedPtrClass< smtk::mesh::Resource > smtk_mesh_Resource = pybind11_init_smtk_mesh_Resource(mesh);
PySharedPtrClass< smtk::mesh::Resource, smtk::resource::Resource > smtk_mesh_Resource = pybind11_init_smtk_mesh_Resource(mesh);
PySharedPtrClass< smtk::mesh::ConnectivityStorage > smtk_mesh_ConnectivityStorage = pybind11_init_smtk_mesh_ConnectivityStorage(mesh);
PySharedPtrClass< smtk::mesh::CellField > smtk_mesh_CellField = pybind11_init_smtk_mesh_CellField(mesh);
PySharedPtrClass< smtk::mesh::CellField > smtk_mesh_PointField = pybind11_init_smtk_mesh_PointField(mesh);
......
......@@ -14,6 +14,7 @@
#include <pybind11/pybind11.h>
#include "smtk/mesh/core/Resource.h"
#include "smtk/resource/Resource.h"
#include "smtk/common/UUID.h"
......@@ -21,9 +22,9 @@
namespace py = pybind11;
PySharedPtrClass< smtk::mesh::Resource > pybind11_init_smtk_mesh_Resource(py::module &m)
PySharedPtrClass< smtk::mesh::Resource, smtk::resource::Resource > pybind11_init_smtk_mesh_Resource(py::module &m)
{
PySharedPtrClass< smtk::mesh::Resource > instance(m, "Resource");
PySharedPtrClass< smtk::mesh::Resource, smtk::resource::Resource > instance(m, "Resource");
instance
.def_property("modelResource", &smtk::mesh::Resource::modelResource, &smtk::mesh::Resource::setModelResource)
.def("associateToModel", &smtk::mesh::Resource::associateToModel, py::arg("uuid"))
......@@ -32,6 +33,8 @@ PySharedPtrClass< smtk::mesh::Resource > pybind11_init_smtk_mesh_Resource(py::mo
.def("cells", (smtk::mesh::CellSet (smtk::mesh::Resource::*)(::smtk::mesh::CellType) const) &smtk::mesh::Resource::cells, py::arg("cellType"))
.def("cells", (smtk::mesh::CellSet (smtk::mesh::Resource::*)(::smtk::mesh::CellTypes) const) &smtk::mesh::Resource::cells, py::arg("cellTypes"))
.def("cells", (smtk::mesh::CellSet (smtk::mesh::Resource::*)(::smtk::mesh::DimensionType) const) &smtk::mesh::Resource::cells, py::arg("dim"))
.def("classifiedTo", &smtk::mesh::Resource::classifiedTo)
.def("classifyTo", &smtk::mesh::Resource::classifyTo)
.def("clearReadWriteLocations", &smtk::mesh::Resource::clearReadWriteLocations)
.def_static("create", (std::shared_ptr<smtk::mesh::Resource> (*)()) &smtk::mesh::Resource::create)
.def_static("create", (std::shared_ptr<smtk::mesh::Resource> (*)(::std::shared_ptr<smtk::mesh::Resource> &)) &smtk::mesh::Resource::create, py::arg("ref"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment