[Paraview] How to add plug-in's parameters to ParaView state file

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Jan 3 15:57:12 EST 2011


Nenad,

The signals that pqApplication core fires are actually forwarded from
vtk-events fired by the proxy manager (look at
pqApplicationCore::onStateSaved/onStateLoaded). So you can add an
observer to those events on the proxy manager from Python and handle
them. However, you cannot really processes the arguments passed to
when the event  is fired in Python. One workaround would be to create
a vtk-class that does the event handling and simply instantiate and
initialize it in Python.

Utkarsh

On Mon, Jan 3, 2011 at 3:13 PM, Nenad Vujicic <nenadus at gmail.com> wrote:
> Dear Utkarsh,
>
> On Mon, Jan 3, 2011 at 2:30 PM, Utkarsh Ayachit
> <utkarsh.ayachit at kitware.com> wrote:
>> Every time SaveState is called in the ParaView GUI, pqApplicationCore
>> singleton fires a signal "stateSaved(vtkPVXMLElement*)". Your code can
>> handle this signal to add new child XML elements to the root.
>> Similarly, there's a stateLoadeded(...) signal that gets fired that
>> you can handle to load the custom elements from the state xml.
>>
>
> Thank You very much on Your suggestion. It works perfectly. Is there
> also some easy solution when working with pvpython and pvbatch clients
> or I should add Python parsing code to servermanager.py
> (servermanager::LoadState())?
>
> Thanks,
> Nenad.
> _______________________________________________
> 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
>


More information about the ParaView mailing list