[Paraview] Some paraview python questions
David Doria
daviddoria at gmail.com
Sat May 2 17:01:14 EDT 2009
1) Adding a view after adding a source with python
I have the following script which adds a sphere to the pipeline browser
#!/usr/bin/pvpython
#must be run from inside paraview!
from paraview import servermanager
sphere = servermanager.sources.Sphere()
pm=servermanager.ProxyManager()
pm.RegisterProxy("sources","mysource",sphere)
This adds "mysource" to the pipeline browser. According to the wiki, it
sounds like the default visibility should be off, but you should just be
able to click the "eye" next to it to actually display the object. However,
I am not seeing an eye at all, not even a disabled one. (
http://rpi.edu/~doriad/NoEye.jpg <http://rpi.edu/%7Edoriad/NoEye.jpg>)
2) The command history (ie. pressing the up arrow to get to previous
commands) does not seem to work in the python shell inside paraview. Can it
be enabled?
3) I can access all of the open sources with this:
p=pm.GetProxiesInGroup("sources").items()
then get a single source with
a=p[0] #up to p[len(p)-1]
When I dir(a), there are no properties (such as visibility) listed. How do
you change that type of property? (the idea would be to something such as
iterate through all of the open items one at a time and save screen shots).
Any help would be great!
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090502/cb19c524/attachment.htm>
More information about the ParaView
mailing list