From b630cab597f9cb2088285610bd1704c8caded43a Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 3 Jul 2024 00:28:15 -0400 Subject: [PATCH 1/5] Update import location for Qt VisPy viewers, but be backwards-compatible. --- glue_ar/__init__.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/glue_ar/__init__.py b/glue_ar/__init__.py index 5a9857f..f85f9dc 100644 --- a/glue_ar/__init__.py +++ b/glue_ar/__init__.py @@ -4,8 +4,10 @@ def setup(): - - from glue_vispy_viewers.scatter.qt.scatter_viewer import VispyScatterViewer + try: + from glue_vispy_viewers.scatter.qt.scatter_viewer import VispyScatterViewer + except ImportError: + from glue_vispy_viewers.scatter.scatter_viewer import VispyScatterViewer VispyScatterViewer.tools += ["ar"] VispyScatterViewer.subtools = { **VispyScatterViewer.subtools, @@ -13,7 +15,10 @@ def setup(): } VispyScatterViewer.subtools["ar"] = ["ar:qr"] - from glue_vispy_viewers.volume.qt.volume_viewer import VispyVolumeViewer + try: + from glue_vispy_viewers.volume.qt.volume_viewer import VispyVolumeViewer + except ImportError: + from glue_vispy_viewers.volume.volume_viewer import VispyVolumeViewer VispyVolumeViewer.tools += ["ar"] VispyVolumeViewer.subtools = { **VispyVolumeViewer.subtools, From d92423488a70ecc1999e92a83d6a596705a9af46 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 3 Jul 2024 01:24:11 -0400 Subject: [PATCH 2/5] Add export tool for Jupyter viewers. --- glue_ar/__init__.py | 22 +++++++- glue_ar/export.py | 56 ++++++++++++++++++- glue_ar/tools/__init__.py | 2 + glue_ar/tools/common.py | 2 + glue_ar/tools/jupyter.py | 93 +++++++++++++++++++++++++++++++ glue_ar/{tools.py => tools/qt.py} | 62 ++------------------- setup.py | 15 ++++- 7 files changed, 190 insertions(+), 62 deletions(-) create mode 100644 glue_ar/tools/__init__.py create mode 100644 glue_ar/tools/common.py create mode 100644 glue_ar/tools/jupyter.py rename glue_ar/{tools.py => tools/qt.py} (56%) diff --git a/glue_ar/__init__.py b/glue_ar/__init__.py index f85f9dc..62e65ec 100644 --- a/glue_ar/__init__.py +++ b/glue_ar/__init__.py @@ -3,7 +3,7 @@ from glue_ar.tools import * # noqa -def setup(): +def setup_qt(): try: from glue_vispy_viewers.scatter.qt.scatter_viewer import VispyScatterViewer except ImportError: @@ -25,3 +25,23 @@ def setup(): "save": VispyVolumeViewer.subtools["save"] + ["save:ar"] } VispyVolumeViewer.subtools["ar"] = ["ar:qr"] + + +def setup_jupyter(): + print("Setup jupyter") + from glue_vispy_viewers.scatter.jupyter import JupyterVispyScatterViewer + from glue_vispy_viewers.volume.jupyter import JupyterVispyVolumeViewer + JupyterVispyScatterViewer.tools += ["save:ar_jupyter"] + JupyterVispyVolumeViewer.tools += ["save:ar_jupyter"] + + +def setup(): + try: + setup_qt() + except ImportError: + pass + + try: + setup_jupyter() + except ImportError: + pass diff --git a/glue_ar/export.py b/glue_ar/export.py index ad5e8be..ca04548 100644 --- a/glue_ar/export.py +++ b/glue_ar/export.py @@ -1,10 +1,18 @@ from os import remove -from os.path import abspath, dirname, join, splitext +from os.path import abspath, dirname, join, split, splitext from subprocess import run import pyvista as pv from gltflib.gltf import GLTF +from glue_vispy_viewers.scatter.scatter_viewer import Vispy3DScatterViewerState +from glue_vispy_viewers.volume.layer_state import VolumeLayerState + +from glue_ar.scatter import scatter_layer_as_multiblock +from glue_ar.utils import bounds_3d_from_layers, xyz_bounds +from glue_ar.volume import bounds_3d, meshes_for_volume_layer + + GLTF_PIPELINE_FILEPATH = join(dirname(abspath(__file__)), "js", "node_modules", "gltf-pipeline", "bin", "gltf-pipeline.js") @@ -169,3 +177,49 @@ def export_modelviewer(output_path, gltf_path, alt_text): with open(output_path, 'w') as f: f.write(html) + + + plotter = pv.Plotter() + layer_states = [layer.state for layer in viewer.layers if layer.enabled and layer.state.visible] + scatter_viewer = isinstance(viewer.state, Vispy3DScatterViewerState) + if scatter_viewer: + bounds = xyz_bounds(viewer.state) + elif viewer.state.clip_data: + bounds = bounds_3d(viewer.state) + else: + bounds = bounds_3d_from_layers(viewer.state, layer_states) + frbs = {} + for layer_state in layer_states: + layer_info = state_dictionary.get(layer_state.layer.label, {}) + if layer_info: + layer_info = layer_info.as_dict() + if isinstance(layer_state, VolumeLayerState): + meshes = meshes_for_volume_layer(viewer.state, layer_state, + bounds=bounds, + precomputed_frbs=frbs, + **layer_info) + else: + meshes = scatter_layer_as_multiblock(viewer.state, layer_state, + scaled=scatter_viewer, + clip_to_bounds=viewer.state.clip_data, + **layer_info) + for mesh_info in meshes: + mesh = mesh_info.pop("mesh") + if len(mesh.points) > 0: + plotter.add_mesh(mesh, **mesh_info) + + return plotter + + +def export_to_ar(viewer, filepath, state_dict, compress=True): + dir, base = split(filepath) + name, ext = splitext(base) + plotter = create_plotter(viewer, state_dict) + html_path = join(dir, f"{name}.html") + if ext in [".gltf", ".glb"]: + export_gl(plotter, filepath, with_alpha=True, compress=compress) + if compress: + compress_gl(filepath) + export_modelviewer(html_path, base, viewer.state.title) + else: + plotter.export_obj(filepath) diff --git a/glue_ar/tools/__init__.py b/glue_ar/tools/__init__.py new file mode 100644 index 0000000..5d8835f --- /dev/null +++ b/glue_ar/tools/__init__.py @@ -0,0 +1,2 @@ +from .jupyter import * # noqa +from .qt import * # noqa diff --git a/glue_ar/tools/common.py b/glue_ar/tools/common.py new file mode 100644 index 0000000..139597f --- /dev/null +++ b/glue_ar/tools/common.py @@ -0,0 +1,2 @@ + + diff --git a/glue_ar/tools/jupyter.py b/glue_ar/tools/jupyter.py new file mode 100644 index 0000000..79caefa --- /dev/null +++ b/glue_ar/tools/jupyter.py @@ -0,0 +1,93 @@ +from os import getcwd +from os.path import exists + +from glue.config import viewer_tool +from glue.viewers.common.tool import Tool + +from glue_ar.export import export_to_ar + +import ipyvuetify as v # noqa +from ipywidgets import HBox, Layout # noqa +from IPython.display import display # noqa +from ipyfilechooser import FileChooser + +from glue_ar.tools.qt import AR_ICON # noqa + +__all__ = ["JupyterARExportTool"] + + +@viewer_tool +class JupyterARExportTool(Tool): + icon = AR_ICON + tool_id = "save:ar_jupyter" + action_text = "Export 3D file" + tool_tip = "Export the current view to a 3D file" + + def activate(self): + file_chooser = FileChooser(getcwd()) + ok_btn = v.Btn(color='success', disabled=True, children=['Ok']) + close_btn = v.Btn(color='error', children=['Close']) + dialog = v.Dialog( + width='500', + persistent=True, + children=[ + v.Card(children=[ + v.CardTitle(primary_title=True, + children=["Select output filepath"]), + file_chooser, + HBox(children=[ok_btn, close_btn], + layout=Layout(justify_content='flex-end', grid_gap='5px')) + ], layout=Layout(padding='8px')) + ] + ) + + def on_ok_click(button, event, data): + self.maybe_save_figure(file_chooser.selected) + + def on_close_click(button, event, data): + self.viewer.output_widget.clear_output() + + def on_selected_change(chooser): + ok_btn.disabled = not bool(chooser.selected_filename) + + ok_btn.on_event('click', on_ok_click) + close_btn.on_event('click', on_close_click) + file_chooser.register_callback(on_selected_change) + + with self.viewer.output_widget: + dialog.v_model = True + display(dialog) + + def maybe_save_figure(self, filepath): + if exists(filepath): + yes_btn = v.Btn(color='success', children=["Yes"]) + no_btn = v.Btn(color='error', children=["No"]) + check_dialog = v.Dialog( + width='500', + persistent=True, + children=[ + v.Card(children=[ + v.CardText(children=["This filepath already exists. Are you sure you want to overwrite it?"]), + HBox(children=[yes_btn, no_btn], layout=Layout(justify_content='flex-end', grid_gap='5px')) + ]) + ] + ) + + def on_yes_click(button, event, data): + self.save_figure(filepath) + self.viewer.output_widget.clear_output() + + def on_no_click(button, event, data): + check_dialog.v_model = False + + yes_btn.on_event('click', on_yes_click) + no_btn.on_event('click', on_no_click) + with self.viewer.output_widget: + check_dialog.v_model = True + display(check_dialog) + else: + self.save_figure(filepath) + self.viewer.output_widget.clear_output() + + def save_figure(self, filepath): + export_to_ar(self.viewer, filepath, state_dict={}, compress=True) diff --git a/glue_ar/tools.py b/glue_ar/tools/qt.py similarity index 56% rename from glue_ar/tools.py rename to glue_ar/tools/qt.py index 5e483a4..33e7dff 100644 --- a/glue_ar/tools.py +++ b/glue_ar/tools/qt.py @@ -1,13 +1,9 @@ import os -from os.path import join, split, splitext +from os.path import split, splitext from tempfile import NamedTemporaryFile from threading import Thread -from glue_vispy_viewers.scatter.scatter_viewer import Vispy3DScatterViewerState -from glue_vispy_viewers.volume.layer_state import VolumeLayerState - import ngrok -import pyvista as pv from qtpy import compat from qtpy.QtWidgets import QDialog @@ -20,12 +16,10 @@ from glue_ar.qr import get_local_ip from glue_ar.qr_dialog import QRDialog -from glue_ar.scatter import scatter_layer_as_multiblock -from glue_ar.export import compress_gl, export_gl, export_modelviewer +from glue_ar.export import export_gl, export_modelviewer from glue_ar.exporting_dialog import ExportingDialog from glue_ar.server import run_ar_server -from glue_ar.utils import bounds_3d_from_layers, xyz_bounds -from glue_ar.volume import bounds_3d, meshes_for_volume_layer +from glue_ar.tools.common import export_to_ar __all__ = ["ARToolMenu", "ARExportTool", "ARLocalQRTool"] @@ -40,39 +34,6 @@ } -def create_plotter(viewer, state_dictionary): - plotter = pv.Plotter() - layer_states = [layer.state for layer in viewer.layers if layer.enabled and layer.state.visible] - scatter_viewer = isinstance(viewer.state, Vispy3DScatterViewerState) - if scatter_viewer: - bounds = xyz_bounds(viewer.state) - elif viewer.state.clip_data: - bounds = bounds_3d(viewer.state) - else: - bounds = bounds_3d_from_layers(viewer.state, layer_states) - frbs = {} - for layer_state in layer_states: - layer_info = state_dictionary.get(layer_state.layer.label, {}) - if layer_info: - layer_info = layer_info.as_dict() - if isinstance(layer_state, VolumeLayerState): - meshes = meshes_for_volume_layer(viewer.state, layer_state, - bounds=bounds, - precomputed_frbs=frbs, - **layer_info) - else: - meshes = scatter_layer_as_multiblock(viewer.state, layer_state, - scaled=scatter_viewer, - clip_to_bounds=viewer.state.clip_data, - **layer_info) - for mesh_info in meshes: - mesh = mesh_info.pop("mesh") - if len(mesh.points) > 0: - plotter.add_mesh(mesh, **mesh_info) - - return plotter - - @viewer_tool class ARToolMenu(SimpleToolMenu): tool_id = "ar" @@ -81,7 +42,7 @@ class ARToolMenu(SimpleToolMenu): @viewer_tool -class ARExportTool(Tool): +class QtARExportTool(Tool): icon = AR_ICON tool_id = "save:ar" action_text = "Export 3D file" @@ -103,26 +64,13 @@ def activate(self): _, ext = splitext(export_path) filetype = _FILETYPE_NAMES.get(ext, None) - worker = Worker(self._export_to_ar, export_path, dialog.state_dictionary, compress=dialog.state.draco) + worker = Worker(export_to_ar, export_path, dialog.state_dictionary, compress=dialog.state.draco) exporting_dialog = ExportingDialog(parent=self.viewer, filetype=filetype) worker.result.connect(exporting_dialog.close) worker.error.connect(exporting_dialog.close) worker.start() exporting_dialog.exec_() - def _export_to_ar(self, filepath, state_dict, compress=True): - dir, base = split(filepath) - name, ext = splitext(base) - plotter = create_plotter(self.viewer, state_dict) - html_path = join(dir, f"{name}.html") - if ext in [".gltf", ".glb"]: - export_gl(plotter, filepath, with_alpha=True, compress=compress) - if compress: - compress_gl(filepath) - export_modelviewer(html_path, base, self.viewer.state.title) - else: - plotter.export_obj(filepath) - @viewer_tool class ARLocalQRTool(Tool): diff --git a/setup.py b/setup.py index a9d5506..e20ffb5 100644 --- a/setup.py +++ b/setup.py @@ -48,16 +48,25 @@ def data_files(root_directory): install_requires=[ "gltflib", "glue-core", - "glue-qt", "glue-vispy-viewers", - "ngrok", "pillow", "pyvista", - "segno" ], extras_require={ "test": [ "flake8" + ], + "qt": [ + "glue-qt" + ], + "jupyter": [ + "glue-jupyter", + "ipyfilechooser", + "ipyvuetify" + ], + "qr": [ + "ngrok", + "segno" ] }, entry_points={ From 4601c353b6d3920d51fd31fc026e3bb494747fdd Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Wed, 3 Jul 2024 15:42:09 -0400 Subject: [PATCH 3/5] Exporting from Jupyter viewers now working (without any option selection). --- glue_ar/__init__.py | 8 ++++---- glue_ar/export.py | 1 + glue_ar/tools/ar.png | Bin 0 -> 17146 bytes glue_ar/tools/ar.svg | 35 +++++++++++++++++++++++++++++++++++ glue_ar/tools/common.py | 2 -- glue_ar/tools/jupyter.py | 8 +++++--- glue_ar/tools/qt.py | 5 ++--- 7 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 glue_ar/tools/ar.png create mode 100644 glue_ar/tools/ar.svg delete mode 100644 glue_ar/tools/common.py diff --git a/glue_ar/__init__.py b/glue_ar/__init__.py index 62e65ec..44d5fa6 100644 --- a/glue_ar/__init__.py +++ b/glue_ar/__init__.py @@ -8,7 +8,7 @@ def setup_qt(): from glue_vispy_viewers.scatter.qt.scatter_viewer import VispyScatterViewer except ImportError: from glue_vispy_viewers.scatter.scatter_viewer import VispyScatterViewer - VispyScatterViewer.tools += ["ar"] + VispyScatterViewer.tools = [t for t in VispyScatterViewer.tools] + ["ar"] VispyScatterViewer.subtools = { **VispyScatterViewer.subtools, "save": VispyScatterViewer.subtools["save"] + ["save:ar"] @@ -19,7 +19,7 @@ def setup_qt(): from glue_vispy_viewers.volume.qt.volume_viewer import VispyVolumeViewer except ImportError: from glue_vispy_viewers.volume.volume_viewer import VispyVolumeViewer - VispyVolumeViewer.tools += ["ar"] + VispyVolumeViewer.tools = [t for t in VispyVolumeViewer.tools] + ["ar"] VispyVolumeViewer.subtools = { **VispyVolumeViewer.subtools, "save": VispyVolumeViewer.subtools["save"] + ["save:ar"] @@ -31,8 +31,8 @@ def setup_jupyter(): print("Setup jupyter") from glue_vispy_viewers.scatter.jupyter import JupyterVispyScatterViewer from glue_vispy_viewers.volume.jupyter import JupyterVispyVolumeViewer - JupyterVispyScatterViewer.tools += ["save:ar_jupyter"] - JupyterVispyVolumeViewer.tools += ["save:ar_jupyter"] + JupyterVispyScatterViewer.tools = [t for t in JupyterVispyScatterViewer.tools] + ["save:ar_jupyter"] + JupyterVispyVolumeViewer.tools = [t for t in JupyterVispyVolumeViewer.tools] + ["save:ar_jupyter"] def setup(): diff --git a/glue_ar/export.py b/glue_ar/export.py index ca04548..b15b696 100644 --- a/glue_ar/export.py +++ b/glue_ar/export.py @@ -179,6 +179,7 @@ def export_modelviewer(output_path, gltf_path, alt_text): f.write(html) +def create_plotter(viewer, state_dictionary): plotter = pv.Plotter() layer_states = [layer.state for layer in viewer.layers if layer.enabled and layer.state.visible] scatter_viewer = isinstance(viewer.state, Vispy3DScatterViewerState) diff --git a/glue_ar/tools/ar.png b/glue_ar/tools/ar.png new file mode 100644 index 0000000000000000000000000000000000000000..6657d0c7523bf0bf25595b3ece05bd9837163efa GIT binary patch literal 17146 zcmeIa_dDEM7d|YB5)mazLe|Z0c@0Cj=a`1}p;`0&kjno#V0V5%)h^IPzP6qxDu|#TXfS>Y`ko*%$LP7v9{j*F$ z;(4EhWc4o+5}8yI66U`%>QRrt56CUlRNy2R#6LMrg-PHQ%D<6@?j$6_+{CX-FY^_= zz>5?fsu~E2rAuU__a#fmEu~0EU@NL{n9j?IjZDf^#*vY5$Cc-^`Y@{-2vRb*A{|=e zk|7174jszyE7=WL)NL4wj`{Hv3DZ|H)PO>as(Ngc=bOOIePEB$7I&&E6s-& z&YmOcJ?bL5a?_?GUk>H_4jFlc6ET={@=g;Umv)U&!o$_PcXHUV?&FW4C70b^*B?wcF{%cT3Fd$A4jb7%ED2K z1Sj;WbbJ^(B4y=Uha21b`cGCxD|~GNlrnlH?>^YMAfV6i&%*uV{lgnyold*g--daEm92zrfqK5Ut!EY#R;2G4j#=L`y$k76 zrqz9p?|ZxgHB$+-Vhdm_UV4tp(oB?89;Q#!t21LIC}?n))Y~ zE$oouTI6=BHyUv?C81~j+g$y}10>QynuAXwFX)~H&71UY7;bi%{E7(rOU8!R-E>4GcO2gT(;Wn9;<@x|^WPLrZ1x{Ynpb$I%1g|&X zAQv9Nf4hL(hbcSnd~~SzjfC`%;w5%mRy?C;ciw_>WGIdYE;JN9k>Fu6Y#a-#;Bwdc zEGrWZF-J+LQ)Be{Sgl0(727Xq%X!Bu^=eyV$CU#u4?c!)-O!`UiJs8Rr^8VcQRduVZuH#J z(kqINyXiPgDzOmm^<`&^|i_}kQklHl{tV;mZ z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-Y1e7l#O z;FTEMo0Kuh53cyg8)U^>GX5v`0S?L=Brth!AVv^p#_k{N;(lY9Zcm0j5kwx4sntw6 z9rNM~&cJn@<)KSR3JR6R$GjqoN{D8bG(;kG6BENh*K0 z!TC7^C?aZ!O+52WriXuXxN3p39UF&@V*1U zABhvuwSS)w%8$5KK0Z__TbvRIzjiy=Sx_V#XBpXQ{zv0IJ^n|M(`wtzi7Ap!9dZAJ z0oTE_BqFr3E3t%sg$&C#&i2<>{?bk+y zHSb6-BG!y9q>4$H2L4S42Db{x=#RL&=Q35lHNu9O+_dLMV3XevNi~ql0QzNzvS)z{ zX?;DfFcm&`7EONRsBLPa3(!mDLa*fQs2=D($h`P-z^@MM$r7zr3Ra*#9yJiuVd`n3 za!1KYhGe8i^(Oq<*&-e>`aidVj#;3a;kc3TOKIcTO-sQ`ff-*;@;g0{?k>mw^a1+s z0dmSNiXcMgNdZOI7I|oczWdWmpg>7*AgehvVka){MOU4xx}XCkOfo?sQX&kU&e>y{ zSc7o#B}$4~+1bgXwwZPVEe;r{dn^s*#%^yi2)yR(C=@bu2Jy>4)cUEnSY#=_T}_89 zzka1RKn-c(Q#M0fXk~pi^Y9{@zUt--t$%#GtM7hBz*R%`w<;pk~*5R_jJx%eCxDInRgb^SCfnoX)O95haIrweA{ESarV2g*coY;}`4MRH2bTvJU^9NZp8td1AOODNvvdX4^u zWWe$dc0YB;k`2<^^Qb{q=#llLiNde2|NCcL;T5;5gEv+}Js#IXBDhR9?!XgT)fbb8QLjcfUU>)HvJx=@H$Bmw#YWW6oj*E0 z$_g%fm7@`mZF3t1H{cA#e)Rp9_hw6wUzeFi!)`z`AEj39xFKx`?&~SP-T(a+1OLZw zSU~C>1sQLww5jn*Er8zx!Q+82@UVLBVJ&0nW(~fPh}{ + + + + + + + + + \ No newline at end of file diff --git a/glue_ar/tools/common.py b/glue_ar/tools/common.py deleted file mode 100644 index 139597f..0000000 --- a/glue_ar/tools/common.py +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/glue_ar/tools/jupyter.py b/glue_ar/tools/jupyter.py index 79caefa..97995a8 100644 --- a/glue_ar/tools/jupyter.py +++ b/glue_ar/tools/jupyter.py @@ -1,3 +1,4 @@ +import os from os import getcwd from os.path import exists @@ -11,14 +12,15 @@ from IPython.display import display # noqa from ipyfilechooser import FileChooser -from glue_ar.tools.qt import AR_ICON # noqa - __all__ = ["JupyterARExportTool"] +AR_ICON = os.path.abspath(os.path.join(os.path.dirname(__file__), "ar")) + + @viewer_tool class JupyterARExportTool(Tool): - icon = AR_ICON + icon = AR_ICON tool_id = "save:ar_jupyter" action_text = "Export 3D file" tool_tip = "Export the current view to a 3D file" diff --git a/glue_ar/tools/qt.py b/glue_ar/tools/qt.py index 33e7dff..afa7dad 100644 --- a/glue_ar/tools/qt.py +++ b/glue_ar/tools/qt.py @@ -16,13 +16,12 @@ from glue_ar.qr import get_local_ip from glue_ar.qr_dialog import QRDialog -from glue_ar.export import export_gl, export_modelviewer +from glue_ar.export import create_plotter, export_gl, export_modelviewer, export_to_ar from glue_ar.exporting_dialog import ExportingDialog from glue_ar.server import run_ar_server -from glue_ar.tools.common import export_to_ar -__all__ = ["ARToolMenu", "ARExportTool", "ARLocalQRTool"] +__all__ = ["ARToolMenu", "QtARExportTool", "ARLocalQRTool"] # This is just some placeholder image that I found online AR_ICON = os.path.abspath(os.path.join(os.path.dirname(__file__), "ar")) From cfd9bceef6624ba94f94012b749ca96d62dfbbba Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Thu, 4 Jul 2024 00:38:50 -0400 Subject: [PATCH 4/5] Add missing argument in export function. --- glue_ar/tools/qt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glue_ar/tools/qt.py b/glue_ar/tools/qt.py index afa7dad..dd8a959 100644 --- a/glue_ar/tools/qt.py +++ b/glue_ar/tools/qt.py @@ -63,7 +63,7 @@ def activate(self): _, ext = splitext(export_path) filetype = _FILETYPE_NAMES.get(ext, None) - worker = Worker(export_to_ar, export_path, dialog.state_dictionary, compress=dialog.state.draco) + worker = Worker(export_to_ar, self.viewer, export_path, dialog.state_dictionary, compress=dialog.state.draco) exporting_dialog = ExportingDialog(parent=self.viewer, filetype=filetype) worker.result.connect(exporting_dialog.close) worker.error.connect(exporting_dialog.close) From e00c5d074beb3e311c5e4fc02ab1d9f53b40d204 Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Thu, 4 Jul 2024 00:48:21 -0400 Subject: [PATCH 5/5] Remove debugging print statement. --- glue_ar/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/glue_ar/__init__.py b/glue_ar/__init__.py index 44d5fa6..fd3fbdc 100644 --- a/glue_ar/__init__.py +++ b/glue_ar/__init__.py @@ -28,7 +28,6 @@ def setup_qt(): def setup_jupyter(): - print("Setup jupyter") from glue_vispy_viewers.scatter.jupyter import JupyterVispyScatterViewer from glue_vispy_viewers.volume.jupyter import JupyterVispyVolumeViewer JupyterVispyScatterViewer.tools = [t for t in JupyterVispyScatterViewer.tools] + ["save:ar_jupyter"]