[Paraview] Changing values of property panel

Yumin Yuan yumin.yuan at kitware.com
Wed Jan 27 09:41:48 EST 2016


Hi Andrzej,

The representation has its own SM proxy,

    vtkSMProxy* repProxy = repr->getProxy();
    vtkSMPropertyHelper(repProxy, "Representation").Set("Surface With
Edges");
    vtkSMPropertyHelper(repProxy, "LineWidth").Set(2);

HTH,
Yumin


On Wed, Jan 27, 2016 at 7:36 AM, Andrzej Peczak <apeczak at ara.co.uk> wrote:

>
> Hi
>
> I am trying to find a way to modify property values of a filter. I figured
> out how to change values of the lookup table through its proxy after which
> the changes are visible in the colour map editor panel widgets.
>
> I can do it with the following snippet code, however I have not found yet
> the way to change properties of the filter property panel.  I need to
> change the view representation of the filter to Surface With Edges and the
> line width. Where  do I acquire required proxy objects from ?
>
>         pqPipelineRepresentation* repr = qobject_cast<
> pqPipelineRepresentation* >(
> pqActiveObjects::instance().activeRepresentation() );
>         if ( repr ) {
>                 vtkSMProxy * lutProxy = repr->getLookupTable()->getProxy();
>                 if ( lutProxy ) {
>                         vtkSMPropertyHelper( lutProxy,
> "NumberOfTableValues" ).Set( this->scalars().count() - 1 );
>                         lutProxy->UpdateVTKObjects();
>                 }
>         }
>
> Andrzej
>
> **********************************************************************
> Please consider the environment. Only print this email if absolutely
> necessary.
>
> This email contains information that is private and confidential and is
> intended only for the addressee.
> If you are not the intended recipient please delete it and notify us
> immediately by e-mailing the sender.
> Note: All email sent to or from this address may be accessed by someone
> other than the recipient, for
> system management and security reasons.
> Aircraft Research Association Ltd.  Registered in England, Registration No
> 503668 Registered Office:
> Manton Lane, Bedford MK41 7PF England VAT No GB 196351245
>
> **********************************************************************
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160127/b5607613/attachment.html>


More information about the ParaView mailing list