From 2ff886457fe899685d9d826c8a29f58a31889dda Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 22 Jan 2024 16:31:17 +0100 Subject: [PATCH] webgui Redraw with arguments (replace mesh etc.) --- python/webgui.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/python/webgui.py b/python/webgui.py index 9e5286a3..494c545b 100644 --- a/python/webgui.py +++ b/python/webgui.py @@ -222,6 +222,17 @@ class WebGLScene(base): self.kwargs = kwargs self.encoding = "b64" + def Redraw(self, *args, **kwargs): + if args or kwargs: + if 'show' not in kwargs: + kwargs['show'] = False + + new_scene = Draw(*args, **kwargs) + self.obj = new_scene.obj + self.args = new_scene.args + self.kwargs = new_scene.kwargs + super().Redraw() + def GetData(self, set_minmax=True): self.kwargs["encoding"] = self.encoding typ = type(self.obj)