[Paraview] Building a PlugIn for v3 for an existing Reader
(OpenFOAM)
Bernhard Gschaider
Bernhard.Gschaider at unileoben.ac.at
Tue May 29 10:19:10 EDT 2007
Hi!
I'm trying to include the reader found in
VTK/IO/vtkOpenFOAMReader.cxx
into the Paraview3-GUI with a PlugIn. I'm using two sources of
information:
1. http://paraview.org/Wiki/Plugin_HowTo
2. Examples/Plugins/GUIReader from the PAraview-Sources
To me they seem to contradict each other. 1 says that I need a
server-Plugin as well in 2 (and the neighbouring directories) I see no
trace for that. From 2 I derived this:
CMakeLists.txt:
FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})
ADD_PARAVIEW_PLUGIN(OpenFOAMGUIPlugin "1.0"
GUI_RESOURCE foamReader.qrc )
foamReader.qrc:
<RCC>
<qresource prefix="/ParaViewResources" >
<file>foamReader.xml</file>
</qresource>
</RCC>
foamReader.xml:
<ParaViewReaders>
<Reader name="OpenFOAMReader"
extensions="controlDict foam"
file_description="OpenFOAM Files">
</Reader>
</ParaViewReaders>
When I run ccmake on this I get this message when configuring:
You have called ADD_LIBRARY for library OpenFOAMGUIPlugin without any source
files. This typically indicates a problem with your CMakeLists.txt file
Compiling generates nothing.
Am I missing something embarrasingly obvious? Or did I misunderstand
something?
Bernhard
PS: I also tried adding this to CMakeLists.txt
ADD_PARAVIEW_PLUGIN(OpenFOAMSMPlugin "1.0"
SERVER_MANAGER_XML foamReader.xml
SERVER_MANAGER_SOURCES /path/to/ParaView3/VTK/IO/vtkOpenFOAMReader.cxx)
This generates a .so (although the XML-File is not correct I think)
that loads into paraview but I guess I need the GUI-Plugin to see it
in the File-Open-dialog.
More information about the ParaView
mailing list