1

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?

3 Answers 3

3

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

Sign up to request clarification or add additional context in comments.

Comments

2

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

1 Comment

There hasn't been any update on this yet. It's on the todo list, but a lower priority :).
1

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)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.