[Paraview] Python programmable source
Andy Bauer
andy.bauer at kitware.com
Tue Feb 13 12:24:38 EST 2018
The programmable source was designed to work on the server-side data only.
By the fact that you're using the built-in server (i.e. the ParaView GUI
and pvserver run in the same process space) you have access to client-side
information like representation type but that stuff is only available after
you've fully executed the programmable source script.
You may want to look at using the Python trace functionality and then
saving that as a macro. That should be a more consistent solution that also
works with a remote pvserver.
On Tue, Feb 13, 2018 at 12:16 PM, Manochehr Bahavar <
manoch at iris.washington.edu> wrote:
> Hello,
>
> I have created a Python programmable source to populate and display a
> vtkPolyData. All works well, however, I would like to change display
> settings via the same Python code. I found out that after I press The Apply
> button I can modify the script to set the representation type to ‘Points’
> but if I place a GetDisplayProperties statement at the end of the script
> initially to gain access to these properties, I will get:
>
> Traceback (most recent call last):
> File "<string>", line 20, in <module>
> File "<string>", line 82, in RequestData
> File "/Applications/ParaView-5.4.1-822-g597adef982.app/Contents/Python/paraview/simple.py",
> line 454, in GetDisplayProperties
> return GetRepresentation(proxy, view)
> File "/Applications/ParaView-5.4.1-822-g597adef982.app/Contents/Python/paraview/simple.py",
> line 437, in GetRepresentation
> view = active_objects.view
> File "/Applications/ParaView-5.4.1-822-g597adef982.app/Contents/Python/paraview/simple.py",
> line 2213, in get_view
> self.__get_selection_model("ActiveView").GetCurrentProxy())
> File "/Applications/ParaView-5.4.1-822-g597adef982.app/Contents/Python/paraview/simple.py",
> line 2191, in __get_selection_model
> pxm = servermanager.ProxyManager(session)
> RuntimeError: maximum recursion depth exceeded
>
> How can I address this problem?
>
> Thanks,
>
> —manoch
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/paraview/attachments/20180213/de15c2bd/attachment.html>
More information about the ParaView
mailing list