Skip to content

Commit

Permalink
Add pybind to CollapsableVert::SetText/GetText and O3DVisualizer::Set…
Browse files Browse the repository at this point in the history
…CollapsableVertOpen
  • Loading branch information
Ewing Kang committed Jul 18, 2024
1 parent 91b0dc0 commit 284cd2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions cpp/open3d/visualization/gui/Layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#pragma once

#include <string>
#include "open3d/visualization/gui/Widget.h"

namespace open3d {
Expand Down
4 changes: 4 additions & 0 deletions cpp/pybind/visualization/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1772,6 +1772,10 @@ void pybind_gui_classes(py::module &m) {
"window is visible")
.def("get_is_open", &CollapsableVert::GetIsOpen,
"Check if widget is open.")
.def("set_text", &CollapsableVert::SetText, "text"_a,
"Sets the text for the CollapsableVert")
.def("get_text", &CollapsableVert::GetText,
"Gets the text for the CollapsableVert")
.def_property("font_id", &CollapsableVert::GetFontId,
&CollapsableVert::SetFontId,
"Set the font using the FontId returned from "
Expand Down
4 changes: 4 additions & 0 deletions cpp/pybind/visualization/o3dvisualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,10 @@ void pybind_o3dvisualizer(py::module& m) {
"enable"_a)
.def("show_skybox", &O3DVisualizer::ShowSkybox,
"Show/Hide the skybox", "show"_a)
.def("set_collapsable_vert_open",
&O3DVisualizer::SetCollapsableVertOpen,
"Expand/Collapse verts in side panels", "vert_name"_a,
"open"_a)
.def_property(
"show_settings",
[](const O3DVisualizer& dv) {
Expand Down

0 comments on commit 284cd2c

Please sign in to comment.