<div dir="ltr">Hi Andrzej,<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 8:25 AM, Andrzej Peczak <span dir="ltr"><<a href="mailto:apeczak@ara.co.uk" target="_blank">apeczak@ara.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><font color="black" face="Tahoma" size="2"><span style="font-size:10pt" dir="ltr"><span class="">Hi Yumin,<br>
<br>
I used your snippet and it is working fine. I also tried to change the properties of the upstream filter in addition to the active one but it put me into trouble. I am modifying the properties with the following code where I want to change the visibility, surface
representation and input array of the upstream. When I execute the code the widgets get changed but nothing happens in the view with regards to the changes I made to the upstream, that is the upstream object stays invisible. To make the object visible I have
to manually click on the active object.</span></span></font></div></div></blockquote><div><br></div><div>You may be missing a render call. Try adding the following at the end</div><div> myView->render();</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><font color="black" face="Tahoma" size="2"><span style="font-size:10pt" dir="ltr"><span class=""> After that the upstream object becomes visible but then its colour mapping does not change in accordance with the input array I set to the upstream.<br></span></span></font></div></div></blockquote><div><br></div><div>You have to also set the same "LookupTable" to the upstream representation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><font color="black" face="Tahoma" size="2"><span style="font-size:10pt" dir="ltr"><span class="">
The other issue I have is when I delete my object from the pipeline after modifying the lookup table. Paraview displays "vtkSMPVRepresentationProxy (0x2f6c8c0): Failed to determine the LookupTable being used." message.<br>
<br></span></span></font></div></div></blockquote><div><br></div><div>Which object? how did you delete it? Normally this message means you have an empty "LookupTable".</div><div><br></div><div>HTH</div><div>Yumin</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt"><font color="black" face="Tahoma" size="2"><span style="font-size:10pt" dir="ltr"><span class=""></span><span class="">
vtkSMProxy* repProxy = repr->getProxy();<br></span><span class="">
const char * arrayName = vtkSMPropertyHelper(repProxy, "ColorArrayName").GetInputArrayNameToProcess();<br>
int association = vtkSMPropertyHelper(repProxy, "ColorArrayName").GetInputArrayAssociation();<br>
<br>
pqDataRepresentation * uRepr = repr->getRepresentationForUpstreamSource();<br>
vtkSMProxy* uRepProxy = uRepr->getProxy();<br>
vtkSMPropertyHelper( uRepProxy, "ColorArrayName" ).SetInputArrayToProcess( association, arrayName );<br>
vtkSMPropertyHelper( uRepProxy, "ColorArrayName" ).Set( arrayName );<br>
vtkSMPropertyHelper( uRepProxy, "Visibility" ).Set( 1 );<br>
vtkSMPropertyHelper( uRepProxy, "Representation" ).Set( "Surface" );<br>
<br>
repProxy->UpdateVTKObjects();<br>
uRepProxy->UpdateVTKObjects();<br>
<br>
<br>
Andrzej<br>
<br>
</span></span></font>
<div style="font-family:Times New Roman;color:#000000;font-size:16px"><span class="">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Yumin Yuan [<a href="mailto:yumin.yuan@kitware.com" target="_blank">yumin.yuan@kitware.com</a>]<br>
<b>Sent:</b> 27 January 2016 14:41<br>
<b>To:</b> Andrzej Peczak<br>
<b>Cc:</b> <a href="mailto:paraview@paraview.org" target="_blank">paraview@paraview.org</a><br>
<b>Subject:</b> Re: [Paraview] Changing values of property panel<br>
</font><br>
</div>
<div></div>
</span><div><div class="h5"><div>
<div dir="ltr">Hi Andrzej,
<div><br>
</div>
<div>The representation has its own SM proxy,</div>
<div><br>
</div>
<div>
<div> vtkSMProxy* repProxy = repr->getProxy();</div>
<div>
<div> vtkSMPropertyHelper(repProxy, "Representation").Set("Surface With Edges");</div>
</div>
<div> vtkSMPropertyHelper(repProxy, "LineWidth").Set(2);</div>
<div><br>
</div>
</div>
<div>HTH,</div>
<div>Yumin</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Jan 27, 2016 at 7:36 AM, Andrzej Peczak <span dir="ltr">
<<a href="mailto:apeczak@ara.co.uk" target="_blank">apeczak@ara.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Hi<br>
<br>
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.<br>
<br>
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 ?<br>
<br>
pqPipelineRepresentation* repr = qobject_cast< pqPipelineRepresentation* >( pqActiveObjects::instance().activeRepresentation() );<br>
if ( repr ) {<br>
vtkSMProxy * lutProxy = repr->getLookupTable()->getProxy();<br>
if ( lutProxy ) {<br>
vtkSMPropertyHelper( lutProxy, "NumberOfTableValues" ).Set( this->scalars().count() - 1 );<br>
lutProxy->UpdateVTKObjects();<br>
}<br>
}<br>
<br>
Andrzej<br>
<br>
**********************************************************************<br>
Please consider the environment. Only print this email if absolutely necessary.<br>
<br>
This email contains information that is private and confidential and is intended only for the addressee.<br>
If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br>
Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br>
system management and security reasons.<br>
Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office:<br>
Manton Lane, Bedford MK41 7PF England VAT No GB 196351245<br>
<br>
**********************************************************************<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">
http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">
http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div><div><div class="h5">
<p>**********************************************************************</p><p>
Please consider the environment. Only print this email if absolutely necessary.</p><p>This email contains information that is private and confidential and is intended only for the addressee.<br>If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.<br>Note: All email sent to or from this address may be accessed by someone other than the recipient, for<br>system management and security reasons.<br>Aircraft Research Association Ltd. Registered in England, Registration No 503668 Registered Office:<br>Manton Lane, Bedford MK41 7PF England VAT No GB 196351245</p><p>**********************************************************************</p>
</div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" rel="noreferrer" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=ParaView" rel="noreferrer" target="_blank">http://markmail.org/search/?q=ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div></div>