[Paraview-developers] Lifecycle / Workflow of a Plugin
Matthias Sonntag
sonntag at iag.uni-stuttgart.de
Wed Dec 21 01:56:59 EST 2016
Hello,
we are developing a Paraview-Plugin to read state files written by our
CFD flow solver (https://www.flexi-project.org/). We managed to get it
somehow running, but the internal logic of ParaView how the plugin is
accessed, created and deleted is not totally clear to us.
We observed the following (a commented logfile is listed below):
1. When opening a file with our plugin, ParaView first creates two
instances of the plugin and directly destroys them, without calling the
RequestInformation or RequestData routines. Why?
2. The third instance (lets call it instanceA) of the plugin finally
executes the RequestInformation routine (but 2 times!) and the file
becomes visible in the pipeline browser.
3. When pressing 'Apply' the RequestInformation is executed again. Why?
And then RequestData routine is called once and everything works as
expected and the data is visualized.
4. Loading a second file leads to the following behaviour:
Steps 1. and 2. are the same for the second file. But additionally the
RequestData routine of the first file (instanceA) is called again. Why?
5. Pressing 'Apply' for the second file shows the same behavior as in
step 3. for the first file.
Basically it works, but we get an additional RequestData call of the
already visualized first file, when loading a second file. In our case
this is quite expensive and we would like to avoid it.
LogFile for the above example:
* Loading first file
visu3DReader 0x431c2e0
~visu3DReader 0x431c2e0
visu3DReader 0x431c2e0
~visu3DReader 0x431c2e0
visu3DReader 0x431c2e0
RequestInformation 0x431c2e0
RequestInformation 0x431c2e0
* Pressing Apply
RequestInformation 0x431c2e0
RequestData0x431c2e0
* Loading second file
visu3DReader 0x736f950
~visu3DReader 0x736f950
visu3DReader 0x74662f0
~visu3DReader 0x74662f0
visu3DReader 0x74662f0
RequestInformation 0x74662f0
RequestInformation 0x74662f0
RequestData 0x431c2e0 <<<<<< Why called again for first file?
* Pressing Apply
RequestInformation 0x74662f0
RequestData 0x74662f0
Can anyone explain/reproduce this behavior? Is there any source of
information how the internal logic of requesting information / data
works? Does anyone know the respective parts in the paraview source code?
Regards,
Matthias Sonntag
More information about the Paraview-developers
mailing list