This MR cleans up several aspects of the pybind11 Python bindings. It's intended to have no change in outward user-facing functionality, but provides future-proofing for the bindings as pybind11 evolves.
The redundant explicit bindings for the Math types have been removed. These are not used (and should not be exposed) since we have typecasters implemented for the functionality which take precedence.
Implemented type casters for TypedMetadata. This means that Vec3SMetadata values in the MetaMap will call the Vec3SMetadata type caster which will subsequently call the Vec3f typecaster resulting in re-usable functionality. This also enables us to pass TypedMetadata values between C++ and Python more explicitly.
Removed Python 2 support
Switched from obj.cast() to the equivalent but preferred py::cast(obj).
Copy of PR#1693 by @matthewdcong
This MR cleans up several aspects of the pybind11 Python bindings. It's intended to have no change in outward user-facing functionality, but provides future-proofing for the bindings as pybind11 evolves.
The redundant explicit bindings for the Math types have been removed. These are not used (and should not be exposed) since we have typecasters implemented for the functionality which take precedence. Implemented type casters for TypedMetadata. This means that Vec3SMetadata values in the MetaMap will call the Vec3SMetadata type caster which will subsequently call the Vec3f typecaster resulting in re-usable functionality. This also enables us to pass TypedMetadata values between C++ and Python more explicitly. Removed Python 2 support Switched from obj.cast() to the equivalent but preferred py::cast(obj).