Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Missing Python Bindings and Add/Update Docstrings #6429

Merged
merged 5 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cpp/pybind/visualization/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,11 @@ void pybind_gui_classes(py::module &m) {
.def("remove_item", &TreeView::RemoveItem,
"Removes an item and all its children (if any)")
.def("clear", &TreeView::Clear, "Removes all items")
.def("get_item", &TreeView::GetItem,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document arguments here as well.

"Returns the widget associated with the provided Item ID. For "
"example, to manipulate the widget of the currently selected "
"item you would use the ItemID of the selected_item property "
"with get_item to get the widget.")
.def_property(
"can_select_items_with_children",
&TreeView::GetCanSelectItemsWithChildren,
Expand Down
18 changes: 18 additions & 0 deletions cpp/pybind/visualization/rendering/rendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,24 @@ void pybind_rendering_classes(py::module &m) {
"The flags should be ORed from Scene.UPDATE_POINTS_FLAG, "
"Scene.UPDATE_NORMALS_FLAG, Scene.UPDATE_COLORS_FLAG, and "
"Scene.UPDATE_UV0_FLAG")
.def("remove_geometry", &Scene::RemoveGeometry,
errissa marked this conversation as resolved.
Show resolved Hide resolved
"Removes the named geometry from the scene.")
.def("show_geometry", &Scene::ShowGeometry,
"Show or hide the named geometry.")
.def("geometry_is_visible", &Scene::GeometryIsVisible,
"Returns false if the geometry is hidden, True otherwise. "
"Note: this is different from whether or not the geometry is "
"in view.")
.def("geometry_shadows", &Scene::GeometryShadows,
"Controls whether an object casts and/or receives shadows: "
"geometry_shadows(name, cast_shadows, receieve_shadows)")
.def("set_geometry_culling", &Scene::SetGeometryCulling,
"Enable/disable view frustum culling on the named object. "
"Culling is enabled by default.")
.def("set_geometry_priority", &Scene::SetGeometryPriority,
"Set sorting priority for named object. Objects with higher "
"priority will be rendering on top of overlapping geometry "
"with lower priority.")
.def("enable_indirect_light", &Scene::EnableIndirectLight,
"Enables or disables indirect lighting")
.def("set_indirect_light", &Scene::SetIndirectLight,
Expand Down
Loading