How to disable mouse wheel zoom? #6836
Unanswered
abdullamuhammad
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am currently building a program using the Open3d Visualization and GUI objects. I'm also casting over WebRTC to run this program in a browser. I want to use the Mouse Wheel to control something in the gui.MouseEvent.WHEEL class.
I successfully made the mouse wheel control my GUI in the way I wanted. However, my issue is that the mouse wheel automatically controls camera settings. So whenever I use the mouse wheel, it zooms into the scene.
I have tried several things but none of them seem to work:
This failed because this command both zooms and changes the FOV of the camera. I tried saving FOV parameters whenever SHIFT is pressed, and then simply manually resetting the camera FOV settings when the mouse wheel is rolled. This doesn't work since SHIFT+Mouse Wheel both zooms AND changes FOV, so this resulted in just a Zoom into the screen.
I couldn't undo the Zoom, because the new Open3D Camera descriptions don't have "get_zoom" as a property anymore.
I couldn't reset the camera using the intrinsics matrix either, because the WebRTC procedure for building a scene ends up creating a camera in the open3d.visualization.rendering.Camera class, instead of open3d.camera.PinholeCameraIntrinsic, so there is no straight-forward way to extract a 3x3 intrinsics matrix.
This failed because the open3d.visualization.rendering.Camera class is not pickleable, so I can't take a deepcopy of it. If I try to save the camera settings, it only saves the actual camera file which updates whenever the camera settings change (i.e. during a zoom.)
This failed because when casting an Open3D GUI to a server that is opened in a browser, keyboard inputs in the browser are not sent back to the server (unless they are modifiers to mouse clicks such as SHIFT, CTRL, or ALT.)
At this point, I am totally at my wits end. I have tried everything to build a simple mouse wheel control of something, but there seems to be no simple straight-forward way to prevent this from also zooming in or changing the camera settings within my scene. Does anybody have any advice on how to approach this? How to either make it so that CTRL+Mouse Wheel doesn't change my zoom settings, while just MOUSE WHEEL alone still does? Or what file I would have to edit to change the native zoom/unzoom control based on the Mouse Wheel?
Beta Was this translation helpful? Give feedback.
All reactions