From cd8d43cbf9b92dd7e3e3d8b1aeb188822a8365d5 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 22 Jan 2024 14:49:17 +0100 Subject: [PATCH] webgui.Draw - boolean argument "show" Useful to extract webgui scene data without displaying it --- python/webgui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/webgui.py b/python/webgui.py index 5c8f6e20..9e5286a3 100644 --- a/python/webgui.py +++ b/python/webgui.py @@ -361,12 +361,12 @@ def _get_draw_default_args(): ) -def Draw(obj, *args, **kwargs): +def Draw(obj, *args, show=True, **kwargs): kwargs_with_defaults = _get_draw_default_args() kwargs_with_defaults.update(kwargs) scene = WebGLScene(obj, args, kwargs_with_defaults) - if wg is not None and wg._IN_IPYTHON: + if show and wg is not None and wg._IN_IPYTHON: if wg._IN_GOOGLE_COLAB: from IPython.display import display, HTML