[Paraview] [EXT] Re: Stupid question on Programmable Source

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Oct 23 15:52:54 EDT 2015


> 1.  I really want this as a reader, that everyone can use.    Is there some way to have the user enter a filename which is more elegant than having them edit the script?   For instance, can the server-side xml plugin stuff be edited slightly to work with a Programmable source, so I could put in a text box for them to type the filename.    Even better would be a popup file browser, but I dream!

All doable :). Just needs some XML magic to come together. This old
post (http://www.kitware.com/blog/home/post/534) talks about how you
can create a XML for programmable source. Adding "ReaderFactor hints"
to the XML will make ParaView treat this as a reader. Then, your users
can simply load the script.

> 2.  I assume without compiling here that I cannot actually get this as a reader, correct?

Wrong :). I've attached the XML created from your script. You can load
this as a plugin using the Plugin Manager, it can now open files using
File Open Dialog. I generated  the XML using

> python python_filter_generator.py ringle_read.py ringle_reader.xm

Then manually editing the XML to add reader factory hints etc. The
python_filter_generator.py needs to be updated/extended to add support
for creating reader etc.

Just load the ringle_reader.xml using the Plugin manager and ParaView
will  be able to open *.neut.out files.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ringle_reader.xml
Type: text/xml
Size: 8737 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151023/65a12d11/attachment.xml>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ringle_read.py
Type: text/x-python
Size: 7115 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151023/65a12d11/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python_filter_generator.py
Type: text/x-python
Size: 10601 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20151023/65a12d11/attachment-0001.py>


More information about the ParaView mailing list