From 7e549495d9ab6edded383fc38f69b4ccc02d7fc2 Mon Sep 17 00:00:00 2001 From: Saran Tunyasuvunakool Date: Tue, 10 Oct 2023 15:03:12 -0700 Subject: [PATCH] Fix macOS mjpython launcher to suppoer show_{left,right}_ui. PiperOrigin-RevId: 572377315 Change-Id: Iee734a6e49821b42e94dc19d9ed92a45ee605ea7 --- python/mujoco/mjpython/mjpython.mm | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/python/mujoco/mjpython/mjpython.mm b/python/mujoco/mjpython/mjpython.mm index 25c6dc33..e2b5d92d 100644 --- a/python/mujoco/mjpython/mjpython.mm +++ b/python/mujoco/mjpython/mjpython.mm @@ -115,12 +115,27 @@ class _MjPythonImpl(mujoco.viewer._MjPythonBase): self._termination = self.__class__.NOT_TERMINATED self._busy = False - def launch_on_ui_thread(self, model, data, handle_return, key_callback): + def launch_on_ui_thread( + self, + model, + data, + handle_return, + key_callback, + show_left_ui, + show_right_ui, + ): with self._cond: if self._busy or self._task is not None: raise RuntimeError('another MuJoCo viewer is already open') else: - self._task = (model, data, handle_return, key_callback) + self._task = ( + model, + data, + handle_return, + key_callback, + show_left_ui, + show_right_ui, + ) self._cond.notify() def terminate(self):