isl-org / isl-org/Open3D

Turning mouse interaction on/off for specific geometry in the Scene

Open
#4,550 2 comments 0 reactions 0 assignees View on GitHub
question ui visualization
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### My Question

HI, I am using the gui module for visualization of multiple geometries. We have function to show/hide geometry using `open3d.visualization.rendering.Open3DScene`, but what I want is to be keep the geometry visible but turn mouse interaction off on specific geometry in the scene.

The following image shows the expected behavior, that is, initially 2 geometries change on mouse interaction, but later interaction is turned off for one. For turning interaction on/off, simple mouse/key event can be implemented.

![ezgif-5-f803865226](https://user-images.githubusercontent.com/11821497/148537380-7942526c-97ad-410b-82f9-2e371bd6f3bb.gif)

I have tried to implement this using `open3d.visualization.gui.SceneWidget.set_on_mouse()` and replacing the mouse interaction functionality using `gui.Widget.EventCallbackResult.CONSUMED`. But this requires re-implementing mouse interactions entirely in python. Is there a better way to do this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the Open3DScene and gui.SceneWidget.set_on_mouse() APIs, including how EventCallbackResult.CONSUMED affects interaction. Determine whether an existing scene or geometry interaction hook can support this without reimplementing mouse behavior; done means a documented way to keep geometry visible while disabling interaction for selected geometry.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
computer-graphics, desktop-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.