From f0b42d79576db57335e33b5f399591248b3bd892 Mon Sep 17 00:00:00 2001 From: Lior Ramati Date: Sun, 29 Mar 2020 13:30:42 +0300 Subject: [PATCH] [python] revert save_to_ply options to properties using properties with getter functions fixes static compilation --- wrappers/python/python.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wrappers/python/python.cpp b/wrappers/python/python.cpp index a55b791fb9..ba4b35f265 100644 --- a/wrappers/python/python.cpp +++ b/wrappers/python/python.cpp @@ -31,12 +31,12 @@ PYBIND11_MODULE(NAME, m) { /** rs_export.hpp **/ py::class_(m, "save_to_ply") .def(py::init(), "filename"_a = "RealSense Pointcloud ", "pc"_a = rs2::pointcloud()) - .def_readonly_static("option_ignore_color", &rs2::save_to_ply::OPTION_IGNORE_COLOR) - .def_readonly_static("option_ply_mesh", &rs2::save_to_ply::OPTION_PLY_MESH) - .def_readonly_static("option_ply_binary", &rs2::save_to_ply::OPTION_PLY_BINARY) - .def_readonly_static("option_ply_normals", &rs2::save_to_ply::OPTION_PLY_NORMALS) - .def_readonly_static("option_ply_threshold", &rs2::save_to_ply::OPTION_PLY_THRESHOLD); - + .def_property_readonly_static("option_ignore_color", [](py::object) { return rs2::save_to_ply::OPTION_IGNORE_COLOR; }) + .def_property_readonly_static("option_ply_mesh", [](py::object) { return rs2::save_to_ply::OPTION_PLY_MESH; }) + .def_property_readonly_static("option_ply_binary", [](py::object) { return rs2::save_to_ply::OPTION_PLY_BINARY; }) + .def_property_readonly_static("option_ply_normals", [](py::object) { return rs2::save_to_ply::OPTION_PLY_NORMALS; }) + .def_property_readonly_static("option_ply_threshold", [](py::object) { return rs2::save_to_ply::OPTION_PLY_THRESHOLD; }); + /** rs.hpp **/ m.def("log_to_console", &rs2::log_to_console, "min_severity"_a); m.def("log_to_file", &rs2::log_to_file, "min_severity"_a, "file_path"_a);