Coverage for trimesh/viewer/__init__.py: 62%
8 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-24 04:40 +0000
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-24 04:40 +0000
1"""
2viewer
3-------------
5View meshes and scenes via pyglet or inline HTML.
6"""
8from .. import exceptions
9from .notebook import (
10 in_notebook,
11 scene_to_html,
12 scene_to_mo_notebook,
13 scene_to_notebook,
14)
16try:
17 # try importing windowed which will fail
18 # if we can't create an openGL context
19 from .windowed import SceneViewer, render_scene
20except BaseException as E:
21 # if windowed failed to import only raise
22 # the exception if someone tries to use them
23 SceneViewer = exceptions.ExceptionWrapper(E)
24 render_scene = exceptions.ExceptionWrapper(E)
27# this is only standard library imports
29# explicitly list imports in __all__
30# as otherwise flake8 gets mad
31__all__ = [
32 "SceneViewer",
33 "SceneWidget",
34 "in_notebook",
35 "render_scene",
36 "scene_to_html",
37 "scene_to_mo_notebook",
38 "scene_to_notebook",
39]