OpenVDB: pyopenvdb Namespace Reference

OpenVDB 9.1.0

Functions
pyopenvdb Namespace Reference

## Functions
openvdb::GridBase::Ptr | getGridFromPyObject (PyObject *)
| Return a pointer to the OpenVDB grid held by the given Python object. More...
openvdb::GridBase::Ptr | getGridFromPyObject (const boost::python::object &)
boost::python::object | getPyObjectFromGrid (const openvdb::GridBase::Ptr &)
| Return a new Python object that holds the given OpenVDB grid. More...

## Function Documentation

## ◆ getGridFromPyObject() [1/2]

openvdb::GridBase::Ptr pyopenvdb::getGridFromPyObject | ( | const boost::python::object & |  | ) |

## ◆ getGridFromPyObject() [2/2]

openvdb::GridBase::Ptr pyopenvdb::getGridFromPyObject | ( | PyObject * |  | ) |

Return a pointer to the OpenVDB grid held by the given Python object.

Exceptions

  openvdb::TypeError | if the Python object is not one of the pyOpenVDB grid types. (See the Python module's GridTypes global variable for the list of supported grid types.)

## ◆ getPyObjectFromGrid()

boost::python::object pyopenvdb::getPyObjectFromGrid | ( | const openvdb::GridBase::Ptr & |  | ) |

Return a new Python object that holds the given OpenVDB grid.

Returns
  `None` if the given grid pointer is null.

Exceptions

  openvdb::TypeError | if the grid is not of a supported type. (See the Python module's GridTypes global variable for the list of supported grid types.)