<div dir="ltr">I figured it  out. What I need is <div><br></div><div><div>GUI_SOURCES</div><div>   ${UI_BUILT_SOURCES}</div></div><div><br></div><div>in ADD_PARAVIEW_PLUGIN().</div><div><br></div><div>However instead modifying the transfer function, what I actually what to do is editing the Scalar to Color map. I have </div>
<div><br></div><div><div>pqDataRepresentation* repr = pqActiveObjects::instance().activeRepresentation();</div><div><br></div><div>vtkColorTransferFunction *ctf = vtkColorTransferFunction::SafeDownCast(repr-&gt;getLookupTable()-&gt;getProxy()-&gt;GetClientSideObject());</div>
<div>ctf-&gt;AddRGBPoint(10, 0, 0, 0);</div><div>ctf-&gt;AddRGBPoint(100, 0, 0, 0);</div></div><div><br></div><div>in my plugin&#39;s constructor, but when I open the transfer function editor after applying the plugin, there&#39;s no new point in the color map. There are just the two default color points. Am I missing something?</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 2:56 PM, Joe Ping-Lin Hsiao <span dir="ltr">&lt;<a href="mailto:phsiao@cs.unc.edu" target="_blank">phsiao@cs.unc.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Which libraries should I link to use pqActiveObjects? I tried ${PARAVIEW_BUILD_SHARED_LIBS} but it doesn&#39;t work.<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>Joe</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Nov 23, 2013 at 5:48 PM, Utkarsh Ayachit <span dir="ltr">&lt;<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Yes, you can indeed write a client-side plugin that updates the active<br>
opacity transfer function. Your plugin can monitor pqActiveObjects<br>
singleton to get access to the active representation and from that you<br>
can access it&#39;s ScalarOpacityFunction. Look at pqColorMapEditor and<br>
pqColorOpacityEditorWidget in ParaView 4.1.0 source to see how that<br>
could be done.<br>
<br>
Utkarsh<br>
<div><div><br>
On Fri, Nov 15, 2013 at 10:36 AM, Joe Ping-Lin Hsiao &lt;<a href="mailto:phsiao@cs.unc.edu" target="_blank">phsiao@cs.unc.edu</a>&gt; wrote:<br>
&gt; I want to modify the transfer function from my plugin, e.g. add and delete<br>
&gt; points.<br>
&gt; In VTK, it would be calling vtkPiecewiseFunction-&gt;AddPoint(). Can I do that<br>
&gt; in Paraview?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Joe<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>