<div dir="ltr"><div><div><div>Thank you, Utkarsh.<br>I already resolved this problem yesterday.<br><br></div>I have registered my widget:<br><span style="font-family:monospace">ADD_PARAVIEW_PROPERTY_GROUP_WIDGET(IFACES1 IFACE_SRC1<br>    TYPE "ColorEditor"<br>    CLASS_NAME pqExtraColorEditorPropertyWidget<br>    )</span><br></div>How should I initialize the property group and property widget in representation of server manager XML?<br><br></div><div>Are there any examples that utilize a similar logic.<br><br>How can I add a property widget to the property group? (via XML or on the level of propertyWidget class)<br><br></div><div>At the moment I did the following:<br><span style="font-family:monospace"><ProxyGroup name="representations"><br>    <RepresentationProxy name="MyRepresentation"<br>                         class="vtkPVMyRepresentation"<br>                         processes="client|renderserver|dataserver"<br>                         base_proxygroup="representations"<br>                         base_proxyname="SurfaceRepresentation"><br>      <Property name="Annotation"<br>                label="Annotation"<br>                command="Annotate"<br>                panel_widget="AnnotationButton"><br>      </Property><br>    </RepresentationProxy><br><br>    <Extension name="UnstructuredGridRepresentation"><br>      <RepresentationType subproxy="MyRepresentation"<br>                          subtype="Surface"<br>                          text="Annotation" /><br>      <SubProxy><br>        <Proxy name="MyRepresentation"<br>               proxygroup="representations"<br>               proxyname="MyRepresentation"><br>        </Proxy><br>        <ShareProperties subproxy="SurfaceRepresentation"><br>          <Exception name="Input" /><br>          <Exception name="Visibility" /><br>          <Exception name="Representation" /><br>        </ShareProperties><br>        <ExposedProperties><br>          <PropertyGroup panel_visibility="default" panel_widget="ColorEditor" label="Coloring"><br>            <Property name="Ambient" /><br>            <Property name="AmbientColor" /><br>            <Property name="ColorArrayName" /><br>            <Property name="Diffuse" /><br>            <Property name="DiffuseColor" /><br>            <Property name="LookupTable" /><br>            <Property name="AnnotationGroups" /><br>          </PropertyGroup><br>        </ExposedProperties><br>      </SubProxy><br>    </Extension><br>  </ProxyGroup></span><br><br></div><div><span id="result_box" class="" lang="en"><span class="">Where</span> <span class="">did I go wrong</span><span class="">?</span></span></div><div><div><div><div><div><div><div><br></div><div>Thanks,<br></div><div>Maxim<br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-09 16:19 GMT+03:00 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">To overcome the build issue, just add the following line to your CMakeLists.txt file after the add_paraview_plugin() call.<div><br></div><div>target_link_libraries(<pluginname> pqApplicationComponents)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Utkarsh</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 8, 2014 at 8:05 AM, Maxim Glibin <span dir="ltr"><<a href="mailto:maxim.glibin@gmail.com" target="_blank">maxim.glibin@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear Utkarsh,<br><br></div><div>Thanks a lot for your help.<br></div><div>But I am not still understand how you can create a widget in the "Display" panel without overriding the standard widgets (like Color Editor).<br>Is it possible to show a widget only within the selected filter?<br></div><div><br></div><div>I have tried to subclass pqColorEditorPropertyWidget and I have compilation problems:<br>2>moc_pqMyColorEditorPropertyWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual void * __thiscall pqColorEditorPropertyWidget::qt_metacast(char const *)" (__<br>imp_?qt_metacast@pqColorEditorPropertyWidget@@UAEPAXPBD@Z) referenced in function "public: virtual void * __thiscall pqMyColorEditorPropertyWidget::qt_metacast(char const *)" (?qt_metacast@pqMyColorEditorPropertyWidget@@UAEPAXPBD@Z)<br>2>moc_pqMyColorEditorPropertyWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual int __thiscall pqColorEditorPropertyWidget::qt_metacall(enum QMetaObject::Cal<br>l,int,void * *)" (__imp_?qt_metacall@pqColorEditorPropertyWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z) referenced in function "public: virtual int __thiscall pqMyColorEditorPropertyWidget::qt_metacall(en<br>um QMetaObject::Call,int,void * *)" (?qt_metacall@pqMyColorEditorPropertyWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z)<br>2>moc_pqMyColorEditorPropertyWidget.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct QMetaObject const pqColorEditorPropertyWidget::staticMetaObject" (__imp<br>_?staticMetaObject@pqColorEditorPropertyWidget@@2UQMetaObject@@B)<br>2>pqMyColorEditorPropertyWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall pqColorEditorPropertyWidget::pqColorEditorPropertyWidget(class vtkSMProxy *,cl<br>ass QWidget *)" (__imp_??0pqColorEditorPropertyWidget@@QAE@PAVvtkSMProxy@@PAVQWidget@@@Z) referenced in function "public: __thiscall pqMyColorEditorPropertyWidget::pqMyColorEditorPropertyWidget(class<br>vtkSMProxy *,class vtkSMProperty *,class QWidget *)" (??pqMyColorEditorPropertyWidget@@QAE@PAVvtkSMProxy@@PAVvtkSMProperty@@PAVQWidget@@@Z)<br>2>pqMyColorEditorPropertyWidget.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall pqColorEditorPropertyWidget::~pqColorEditorPropertyWidget(void)" (__im<br>p_??1pqColorEditorPropertyWidget@@UAE@XZ) referenced in function "public: virtual __thiscall pqMyColorEditorPropertyWidget::~pqMyColorEditorPropertyWidget(void)" (??1pqMyColorEditorPropertyWidget@@UAE<br>@XZ)<br></div><div><br></div>Best regards,<br></div>Maxim<div><div><br><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-07 19:55 GMT+03:00 Utkarsh Ayachit <span dir="ltr"><<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>> 1. How can I assign my custom button into 'Display' panel?<br>
<br>
</span>I am assuming you're using ParaView 4.2. There's no "Display" panel in<br>
ParaView 4.2, but simply the Properties panel that shows<br>
pqPropertyWidget instances for properties on proxies. The widget that<br>
allows users to pick the array to color with is called<br>
pqColorEditorPropertyWidget [1]. The Panel creates this widget when it<br>
encounters a property group that requests 'ColorEditor' as the<br>
"panel_widget" [2]. In your plugin, you can either subclass<br>
pqColorEditorPropertyWidget or create a new one that you'd want to use<br>
whenever "ColorEditor" widget is requested by any proxy. You can<br>
register your widget for the TYPE set to "ColorEditor" in<br>
add_paraview_property_group_widget() [3] and your widget will be used<br>
instead of the default pqColorEditorPropertyWidget in the panel.<br>
<span><br>
> 2. How can I get an instance of color legend to change annotations by using<br>
> input or output information of filter?<br>
<br>
</span>Now entirely sure what you're looking for, but here's a way:<br>
<br>
a). first track down the lookup-table ( transfer function) proxy of<br>
interest. You can get it several ways: using the "LookupTable"<br>
property on the "representation" proxy providing the data being<br>
colored, or by using vtkSMTransferFunctionManager [4]. Once you have<br>
the transfer function proxy, you can locate the legend for that in a<br>
view using vtkSMTransferFunctionProxy::FindScalarBarRepresentation()<br>
[5]. Look at the implementation for<br>
vtkSMPVRepresentationProxy::SetScalarBarVisibility(); that'll give you<br>
some hints.<br>
<br>
[1] <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classpqColorEditorPropertyWidget.html" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classpqColorEditorPropertyWidget.html</a><br>
[2] <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classpqStandardPropertyWidgetInterface.html#a83531c3804ae704d71dc917706e2e40e" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classpqStandardPropertyWidgetInterface.html#a83531c3804ae704d71dc917706e2e40e</a><br>
[3] <a href="http://www.paraview.org/Wiki/Plugin_HowTo#Adding_Customizations_for_Properties_Panel" target="_blank">http://www.paraview.org/Wiki/Plugin_HowTo#Adding_Customizations_for_Properties_Panel</a><br>
[4] <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classvtkSMTransferFunctionManager.html" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classvtkSMTransferFunctionManager.html</a><br>
[5] <a href="http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classvtkSMTransferFunctionProxy.html#ac50a4c96be88696ca032048efc6c965a" target="_blank">http://www.paraview.org/ParaView3/Doc/Nightly/www/cxx-doc/classvtkSMTransferFunctionProxy.html#ac50a4c96be88696ca032048efc6c965a</a><br>
<span><br>
<br>
On Fri, Dec 5, 2014 at 2:05 AM, Maxim Glibin <<a href="mailto:maxim.glibin@gmail.com" target="_blank">maxim.glibin@gmail.com</a>> wrote:<br>
> Hello all,<br>
><br>
> I am interested in creating a plugin filter that will change the color<br>
> legend by pressing a button as shown at the attached picture.<br>
><br>
> And I have a few questions:<br>
<br>
</span><span>> 2. How can I get an instance of color legend to change annotations by using<br>
> input or output information of filter?<br>
><br>
> Best regards,<br>
> Maxim<br>
><br>
> --<br>
> Yours Sincerely,<br>
> GLIBIN Maxim O. - Developer<br>
> Phone : <a href="tel:%2B7%20%28987%29%20533%2000%2055" value="+79875330055" target="_blank">+7 (987) 533 00 55</a><br>
> Email: <a href="mailto:maxim.glibin@gmail.com" target="_blank">maxim.glibin@gmail.com</a><br>
><br>
><br>
</span>> _______________________________________________<br>
> Paraview-developers mailing list<br>
> <a href="mailto:Paraview-developers@paraview.org" target="_blank">Paraview-developers@paraview.org</a><br>
> <a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br><div><div dir="ltr"><div><div dir="ltr">Yours Sincerely,<br><b>GLIBIN Maxim O.</b> - Developer<br>Phone : <a href="tel:%2B7%20%28987%29%20533%2000%2055" value="+79875330055" target="_blank">+7 (987) 533 00 55</a><br>
Email: <a href="mailto:maxim.glibin@gmail.com" target="_blank">maxim.glibin@gmail.com</a><div><br></div></div></div></div></div>
</div></div></div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Yours Sincerely,<br><b>GLIBIN Maxim O.</b> - Developer<br>Phone : +7 (987) 533 00 55<br>
Email: <a href="mailto:maxim.glibin@gmail.com" target="_blank">maxim.glibin@gmail.com</a><div><br></div></div></div></div></div>
</div>