[Paraview-developers] Improvement of pqSelectionInputWidget

Lodron, Gerald Gerald.Lodron at joanneum.at
Wed Mar 5 13:20:34 EST 2014


Hi,

I know, i did it like that. We make our own PropertyPanels for our plugins and do not use the xml way because of some reasons:
-> it is not possible to enable/disable properties with dependencies to other porperties (e.g. a nearest neigbour filter plugin of us can use a k nearest neigbour search OR a distance radius search but not both)
-> It is really complicated for nontrivial properties like attribute arrays of pointdata/celldata. I want also mention that not every xml functionality is dokumented in (http://paraview.org/Wiki/Plugin_HowTo#Adding_Customizations_for_Properties_Panel) like "Animateable" (what is that?), how to use
selections, how to use optional inputs, Multiselection of pointdata/celldata attributes, etc... For me it was really time consuming to find that stuff out. On the dokus only trivial cases were shown like double or int properties....  It would be really rate if that could be enhanced (but may it is too late for me :-). May it would also be an idea to develop an xml generator app to make it easier (like in qt the ui-gui editor)?
-> Information only properties were not rendered and i have no clue how to enable the rendering for them, may there is a way but i do not found it...
 (we like output some meta info to the user liike computation time etc. We currently do that over an information only property)

But don't understand me wrong, only suggestions, Paraview is a great tool and dont want to miss it any more....

Best regards,
Gerald

________________________________________
Von: Utkarsh Ayachit [utkarsh.ayachit at kitware.com]
Gesendet: Mittwoch, 5. März 2014 18:47
An: Lodron, Gerald
Cc: Paraview Developer (Paraview-developers at paraview.org)
Betreff: Re: [Paraview-developers] Improvement of pqSelectionInputWidget

Gerald,

That's be totally okay. If you submit a topic to gerrit
(http://www.paraview.org/Wiki/ParaView/Git/Develop) or just attach a
patch, that'll make it easier to get this incorporated.

At the same time, I'd like to mention that you don't really need to
patch ParaView for such changes. A plugin can easily provide new
pqPropertyWidget subclasses and then have them used for the properties
on your proxies without changing ParaView code
(http://paraview.org/Wiki/Plugin_HowTo#Adding_Customizations_for_Properties_Panel)

Utkarsh

On Wed, Mar 5, 2014 at 12:26 AM, Lodron, Gerald
<Gerald.Lodron at joanneum.at> wrote:
> Hello
>
>
>
> In a paraview plugin I reuse the pqSelectionInputWidget wich is in "original
> paraview" only used in ExtractSelection filter. The problem is that the
> "CopyActiveSelection" button only works if a selection is done. If nothing
> is selected the old selection is kept. Since my plugin filter has an
> optional input of selection it would be nice if the widget could set its
> state to an empty selection if "CopyActiveSelection" button is pressed on an
> empty active selection.....
>
> This can be easily done by following changes in:
>
>
>
> void pqSelectionInputWidget::copyActiveSelection()
>
> {
>
>   pqSelectionManager* selMan = (pqSelectionManager*)(
>
>
> pqApplicationCore::instance()->manager("SelectionManager"));
>
>
>
>   if (!selMan)
>
>     {
>
>     qDebug() << "No selection manager was detected. "
>
>       "Don't know where to get the active selection from.";
>
> pqSMProxy emptySource;
>
> this->setSelection(emptySource);
>
>     return;
>
>     }
>
>
>
>   pqOutputPort* port = selMan->getSelectedPort();
>
>   if (!port)
>
>     {
>
> pqSMProxy emptySource;
>
> this->setSelection(emptySource);
>
>
>
>     return;
>
>     }
>
>
>
>   vtkSMProxy* activeSelection = port->getSelectionInput();
>
>   if (!activeSelection)
>
>     {
>
> pqSMProxy emptySource;
>
> this->setSelection(emptySource);
>
>
>
>     return;
>
>     }
>
>
>
> ... rest keep the same. Would be nice if this could be done in next release
> (or can I check that in in some way? I do not exactly know how...)....
>
>
>
> Thanks,
>
> Gerald
>
>
>
> JOANNEUM RESEARCH Forschungsgesellschaft mbH
>
>
>
> DIGITAL - Institute for Information and Communication Technologies
>
> Steyrergasse 17, 8010 Graz, Austria
>
>
>
> phone: +43 316 876-1751
>
> fax: +43 316 8769-1751
>
> e-mail: gerald.lodron at joanneum.at
>
> web: www.joanneum.at/digital
>
> _________________________________________________________________
>
>
>
> This message and any attached files are confidential and intended solely for
> the addressee(s). Any publication, transmission or other use of the
> information by a person or entity other than the intended addressee(s) is
> prohibited. If you receive this in error please contact the sender and
> delete the material. The sender does not accept liability for any errors or
> omissions as a result of the transmission.
>
>
>
> Please consider the environment before printing this page.
>
>
>
>
>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>


More information about the Paraview-developers mailing list