Loading...
Searching...
No Matches
pyopenvdb Namespace Reference

## Functions

openvdb::GridBase::Ptr | getGridFromPyObject (PyObject *)
| Return a pointer to the OpenVDB grid held by the given Python object.
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.

## Function Documentation

## getGridFromPyObject() [1/2]

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

## getGridFromPyObject() [2/2]

openvdb::GridBase::Ptr 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 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.)