Skip to content

Commit 7ae8399

Browse files
Fix MacOs launch button.
1 parent f023b8a commit 7ae8399

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Core/Rendering/VedoVisualizer.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,26 +135,26 @@ def init_visualizer(self):
135135
actors = []
136136
for window in sorted(instances.keys()):
137137
actors.append(instances[window])
138-
plt = show(actors,
139-
new=True,
140-
N=len(actors),
141-
sharecam=True,
142-
interactive=False,
143-
title='SofaVedo',
144-
axes=4)
145-
plt.addButton(plt.interactor.TerminateApp, states=["start"])
146-
plt.interactive()
138+
self.__plotter = show(actors,
139+
new=True,
140+
N=len(actors),
141+
sharecam=True,
142+
interactive=False,
143+
title='SofaVedo',
144+
axes=4)
145+
self.__plotter.addButton(self.__plotter.interactor.TerminateApp, states=["start"])
146+
self.__plotter.interactive()
147147
# Once the user closed the window, recreate a new Plotter
148148
if system() != 'Darwin':
149-
camera = {'pos': plt.camera.GetPosition(),
150-
'focalPoint': plt.camera.GetFocalPoint()}
149+
camera = {'pos': self.__plotter.camera.GetPosition(),
150+
'focalPoint': self.__plotter.camera.GetFocalPoint()}
151151
self.__plotter = show(actors,
152152
new=True,
153153
N=len(actors),
154154
sharecam=True,
155155
interactive=False,
156156
title='SofaVedo',
157-
axes=plt.axes,
157+
axes=self.__plotter.axes,
158158
camera=camera)
159159

160160
def update_instance(self,

0 commit comments

Comments
 (0)