diff --git a/src/ansys/pyensight/core/renderable.py b/src/ansys/pyensight/core/renderable.py index 2e311113641..bad54c8cf6f 100644 --- a/src/ansys/pyensight/core/renderable.py +++ b/src/ansys/pyensight/core/renderable.py @@ -557,10 +557,13 @@ class RenderableVNC(Renderable): """Generates an ansys-nexus-viewer component that can be used to connect to the EnSight VNC remote image renderer.""" def __init__(self, *args, **kwargs) -> None: + ui = kwargs.get("ui") + if kwargs.get("ui"): + kwargs.pop("ui") super().__init__(*args, **kwargs) + self._ui = ui self._generate_url() self._rendertype = "remote" - self._ui = kwargs.get("ui") self.update() def _update_2023R2_or_less(self): diff --git a/src/ansys/pyensight/core/session.py b/src/ansys/pyensight/core/session.py index 7c8be146a4d..4a1a153bdb0 100644 --- a/src/ansys/pyensight/core/session.py +++ b/src/ansys/pyensight/core/session.py @@ -838,6 +838,7 @@ def show( aa: int = 4, fps: float = 30.0, num_frames: Optional[int] = None, + ui: Optional[str] = "simple", ) -> "renderable.Renderable": """Capture the current EnSight scene or otherwise make it available for display in a web browser. @@ -898,7 +899,7 @@ def show( if self._html_port is None: raise RuntimeError("No websocketserver has been associated with this Session") - kwargs = dict( + kwargs: Dict[str, Union[float, int, None, str]] = dict( height=height, width=width, temporal=temporal, aa=aa, fps=fps, num_frames=num_frames ) if self._jupyter_notebook: # pragma: no cover @@ -924,6 +925,7 @@ def show( else: render = RenderableSGEO(self, **kwargs) elif what == "remote": + kwargs["ui"] = ui render = RenderableVNC(self, **kwargs) elif what == "remote_scene": render = RenderableEVSN(self, **kwargs)