[Paraview] Python Proogrammable Filter - Get Proxy

pat marion pat.marion at kitware.com
Tue Nov 15 00:10:13 EST 2011


Hi Markus,

What you're trying to do is discouraged, you shouldn't attempt to access
proxies from within the programmable filter.  If you were running paraview
in a client-server setup, it would not work because the filter and its
proxy would exist on different processes.

Anyway, here's some code that may work for you:

 import paraview.servermanager as sm

proxies = sm.ProxyManager().GetProxiesInGroup("sources").values()

selfProxy = [p for p in proxies if p.GetClientSideObject() is self][0]


Hope this helps!


Pat


On Mon, Nov 14, 2011 at 2:07 PM, Markus Fuger <m_fuger at hotmail.com> wrote:

>  Hello,
>
> I do like to program my own plugin based on a Python Programmable filter
> (PPF).
> For some feature (I want to get the file directory of the files from the
> input of the very first proxy in the pipeline) I need the proxy object of
> the PPF.
>
> If I once would have this object I could then loop the Input until there
> is none anymore and then read the FileInfo Field. But as described I would
> need the proxy object of the PPF first.
> I did several tests with the self object as well as with the proxymanager
> but could not find a working solution. (I have to say that I am new to
> ParaView as well)
>
> Perhaps somebody of this mailing list could help me!?
>
> With kind regards,
> Markus
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111114/2baf6956/attachment-0001.htm>


More information about the ParaView mailing list