On Wed, 2010-03-24 at 12:02 +0000, Adriano Gagliardi wrote:
> Yeah, that's what I am using at the moment. However, when I select my mesh
> file initially using File->Open, RequestInformation is called. At this point
> in time, no data file has been selected. I then have a vtkSetStringMacro
> that allows me to browse for a second input file (the data file). However,
> for this to then be read in to obtain the variables contained within (hence
> populate the point array table), I need to click apply again so that
> RequestInformation is called. I was just wondering if there was a workaround
> so I could avoid having to reapply the filter.

Yes and no.

You should take a look at how to write custom panels
http://www.cmake.org/Wiki/CustomObjectPanels

This will let you add various Qt elements to the reader panel.
If you mark their corresponding properties with << is_internal="1" >> in
the SM xml, you can set/unset the values directly.
One of the elements could, for example, be used to populate/repopulate
some vtkDataArraySelection containers.

For these purposes, inheriting from pqAutoGeneratedObjectPanel should be
sufficient.

There is only one side-effect that I haven't been able to work around:
Updating the vtkDataArraySelection in this manner *will* cause the
reader panel to notice that it has been changed (lighting up the Apply
button). Pressing the Reset button fixes that while still retaining the
changes that your custom Qt bits did.

It would still be nice to figure how to avoid this last bit.
Perhaps someone from the mailing list, or from KitWare, has a good
suggestion.

/mark



DISCLAIMER:
This electronic transmission (and any attachments thereto) is intended solely 
for the use of the addressee(s). It may contain confidential or legally 
privileged information. If you are not the intended recipient of this message, 
you must delete it immediately and notify the sender. Any unauthorized use or 
disclosure of this message is strictly prohibited. Faurecia does not guarantee 
the integrity of this transmission and shall therefore never be liable if the 
message is altered or falsified nor for any virus, interception or damage to 
your system.



DISCLAIMER:
This electronic transmission (and any attachments thereto) is intended solely 
for the use of the addressee(s). It may contain confidential or legally 
privileged information. If you are not the intended recipient of this message, 
you must delete it immediately and notify the sender. Any unauthorized use or 
disclosure of this message is strictly prohibited. Faurecia does not guarantee 
the integrity of this transmission and shall therefore never be liable if the 
message is altered or falsified nor for any virus, interception or damage to 
your system.

_______________________________________________
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

Reply via email to