So I’m developping a module in python and at some point i need to move the camera around. For that I need to disable all the interaction that moves the camera around in the 3D view.
My solution for now is to reach the interactor and to delete it until the module does not need it anymore. I use those few lines to achieve it :
#Copy original interactor
self.interactorStyle = slicer.app.layoutManager().threeDWidget(0).threeDView().interactorStyle()
self.interactor = self.interactorStyle.GetInteractor()
#Delete the interactor
#Reset the interactor
It works for now but i’m afraid that it could interfere with other modules or cause problem with slicer directly.
I tried to find some other functions on vtkInteractorStyle but none seemed to work as i wanted.
Is there a way to achieve what i did directly in slicer or with a function i would have missed ?