Reputation: 179
I am just starting to learn Paraview and how to interact with it from a Python script (executed in IPython). The tutorial shows how to create a view and render it. Example:
from paraview.simple import *
Cone()
Show()
Render()
The resulting window is non-interactive though. How can I enable basic mouse interactions like rotation and zoom?
Upvotes: 1
Views: 1559
Reputation: 101
pvbatch doesn't support interaction.
But you can interact with these views in pvpython.
Just like this:
from paraview.simple import *
Cone()
Show()
Render()
Interact()
See Interacting with views in ParaView Python (pvpython)
Upvotes: 1
Reputation: 31
Appears that it should be possible through the function
paraview.simple.Interact(view=None)
in the most recent version. See http://www.paraview.org/ParaView3/Doc/Nightly/www/py-doc/paraview.simple.html#paraview.simple.Interact
Upvotes: 3
Reputation: 2956
I found an old post in paraview mailing list that says it's not possible: (http://www.paraview.org/pipermail/paraview/2007-June/005230.html)
On Thu, 14 Jun 2007 Utkarsh Ayachit wrote : Currently, the render window cannot be made interactive through pvpython. To get an interactor to work in ParaView, there's some additional meat that needs to be implemented by the GUI layer. The python API does not provide for that.
I don't know if there have been updates in the meanwhile
Upvotes: 2