#NEWLINE# def _recorder_changed( self , r ) : #NEWLINE# #INDENT# 'When the recorder is set we add an event handler so we can\n        record the change to the camera position after the interaction.\n        ' #NEWLINE# iren = self . _interactor #NEWLINE# if ( r is not None ) : #NEWLINE# #INDENT# self . _script_id = r . get_script_id ( self ) #NEWLINE# id = iren . add_observer ( 'EndInteractionEvent' , messenger . send ) #NEWLINE# self . _camera_observer_id = id #NEWLINE# i_vtk = tvtk . to_vtk ( iren ) #NEWLINE# messenger . connect ( i_vtk , 'EndInteractionEvent' , self . _record_camera_position ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _script_id = '' #NEWLINE# iren . remove_observer ( self . _camera_observer_id ) #NEWLINE# i_vtk = tvtk . to_vtk ( iren ) #NEWLINE# messenger . disconnect ( i_vtk , 'EndInteractionEvent' , self . _record_camera_position )