From 42346b19d8bd6f9d68ef97a9174369f26992b6ff Mon Sep 17 00:00:00 2001 From: hermosaaurora Date: Sat, 19 Aug 2023 13:23:44 +0800 Subject: [PATCH] Fix #130: the user can choose whether to show the axes or not in function `set_scene` --- python/py_package/utils/viewer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/py_package/utils/viewer.py b/python/py_package/utils/viewer.py index ee48d5ee..1168c1f0 100644 --- a/python/py_package/utils/viewer.py +++ b/python/py_package/utils/viewer.py @@ -204,6 +204,7 @@ def __init__( renderer: SapienRenderer, shader_dir="", resolutions=(1024, 768), + show_axes=True, ): if not os.path.exists("imgui.ini"): with open("imgui.ini", "w") as f: @@ -227,7 +228,7 @@ def __init__( self.fovy = np.pi / 2 self.axes = None - self.show_axes = True + self.show_axes = show_axes self.axes_scale = 0.1 self.selected_entity = None @@ -1979,7 +1980,7 @@ def set_scene(self, scene: Scene): self.fps_camera_controller = FPSCameraController(self.window) self.arc_camera_controller = ArcRotateCameraController(self.window) self.create_visual_objects() - self.toggle_axes(True) + self.toggle_axes(self.show_axes) self.set_fovy(np.pi / 2) def set_camera_xyz(self, x, y, z):