|
1 | | -import pathlib |
2 | | - |
3 | 1 | import ipywidgets as widgets |
4 | 2 | import pythreejs as three |
5 | 3 | from compas.colors import Color |
@@ -41,12 +39,10 @@ class Viewer: |
41 | 39 | def __init__( |
42 | 40 | self, |
43 | 41 | config: Config = None, |
44 | | - configpath: str = None, |
45 | 42 | scene: Scene = None, |
46 | 43 | controller: Controller = None, |
47 | 44 | ): |
48 | | - configpath = configpath or pathlib.Path(__file__).parent / "config.json" |
49 | | - self.config = config or Config.from_json(configpath) |
| 45 | + self.config = config or Config() |
50 | 46 | self.scene = scene or Scene(context="Notebook") |
51 | 47 | self.controller = controller or Controller(viewer=self) |
52 | 48 |
|
@@ -289,21 +285,21 @@ def make_toolbar(self) -> widgets.HBox: |
289 | 285 | """ |
290 | 286 | buttons = [] |
291 | 287 |
|
292 | | - load_scene_button = widgets.Button( |
293 | | - icon="folder-open", |
294 | | - tooltip="Load scene", |
295 | | - layout=widgets.Layout(width="48px", height="32px"), |
296 | | - ) |
297 | | - load_scene_button.on_click(lambda x: self.controller.load_scene()) |
298 | | - buttons.append(load_scene_button) |
299 | | - |
300 | | - save_scene_button = widgets.Button( |
301 | | - icon="save", |
302 | | - tooltip="Load scene", |
303 | | - layout=widgets.Layout(width="48px", height="32px"), |
304 | | - ) |
305 | | - save_scene_button.on_click(lambda x: self.controller.save_scene()) |
306 | | - buttons.append(save_scene_button) |
| 288 | + # load_scene_button = widgets.Button( |
| 289 | + # icon="folder-open", |
| 290 | + # tooltip="Load scene", |
| 291 | + # layout=widgets.Layout(width="48px", height="32px"), |
| 292 | + # ) |
| 293 | + # load_scene_button.on_click(lambda x: self.controller.load_scene()) |
| 294 | + # buttons.append(load_scene_button) |
| 295 | + |
| 296 | + # save_scene_button = widgets.Button( |
| 297 | + # icon="save", |
| 298 | + # tooltip="Load scene", |
| 299 | + # layout=widgets.Layout(width="48px", height="32px"), |
| 300 | + # ) |
| 301 | + # save_scene_button.on_click(lambda x: self.controller.save_scene()) |
| 302 | + # buttons.append(save_scene_button) |
307 | 303 |
|
308 | 304 | zoom_in_button = widgets.Button( |
309 | 305 | icon="search-plus", |
|
0 commit comments