German Larrain committed f896d63

graphics.adapters.VtkAdapter: renamed attribute 'iren' to 'interactor'.

Comments (0)

Files changed (1)


 		super(VtkAdapter, self).__init__()
 		self.renderer = vtk.vtkRenderer()
 		self.render_window = None
-		self.iren = None
+		self.interactor = None
 		self._title = ''
 		self._size = None
 		self._zoom = None
 		# create a rendering window and RenderWindowInteractor
 		self.render_window = vtk.vtkRenderWindow()
-		self.iren = vtk.vtkRenderWindowInteractor()
-		self.iren.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())
-		self.iren.SetRenderWindow(self.render_window)
+		self.interactor = vtk.vtkRenderWindowInteractor()
+		self.interactor.SetInteractorStyle(
+			vtk.vtkInteractorStyleTrackballCamera())
+		self.interactor.SetRenderWindow(self.render_window)
 		# set properties
-		self.iren.AddObserver(gp.TIMER_EVENT, self._timer_callback)
+		self.interactor.AddObserver(gp.TIMER_EVENT, self._timer_callback)
 		#noinspection PyUnusedLocal
-		timerId = self.iren.CreateRepeatingTimer(gp.TIMER_PERIOD)  #@UnusedVariable
-		self.iren.AddObserver(gp.KEY_PRESS_EVENT, self._key_press_callback)
-		self.iren.Start()
+		timerId = self.interactor.CreateRepeatingTimer(gp.TIMER_PERIOD)
+		self.interactor.AddObserver(
+			gp.KEY_PRESS_EVENT, self._key_press_callback)
+		self.interactor.Start()
 	def restart_window(self):
 		# TODO: code according to start_window(), reset() and the desired behavior
 	def finalize_window(self):
 		"""Finalize and delete :attr:`renderer`, :attr:`render_window`
-		and :attr:`iren`.
+		and :attr:`interactor`.
 		.. seealso::
-		self.iren.TerminateApp()
+		self.interactor.TerminateApp()
-		# Instead of `del render_window, iren` as would be done in a script,
-		# this works too. Clearing `renderer` is not necessary to close
+		# Instead of `del render_window, interactor` as would be done in a
+		# script, this works too. Clearing `renderer` is not necessary to close
 		# the window, just a good practice.
 		self.renderer = None
 		self.render_window = None
-		self.iren = None
+		self.interactor = None
 	def _update_pose(obj, pos, rot):
 		# remove all actors
-			self.iren.ExitCallback()
+			self.interactor.ExitCallback()
 		except AttributeError:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.