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<T>() to the equivalent but preferred py::cast<T>(obj).
:x: - login: @matthewdcong / name: Matthew Cong . The commit (a594b52ca8715043b9dce5eed096a2900b6b44ee, da5db29cad18f43a8117131768a984bc9c4e74e3, 4abcf31a330de96fbba5fb72f954528b2c6b8b29, b83a3acccb1cd23a6500cd03a363fc6592bdf39f, b60aae4607be59637fad29be73d0a9199fcda972) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.
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.
obj.cast<T>()
to the equivalent but preferredpy::cast<T>(obj)
.