Sorry to keep asking questions but pqRepresentation doesn't have a "getInput()" method...<br><br>Regards,<br>Paul<br><br><div><span class="gmail_quote">On 04/01/2008, <b class="gmail_sendername">Clinton Stimpson
</b> <<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
In your pqDisplayPanelInterface implementation you check for the source<br>or filter like so:<br><br>bool MyDisplayInterface::canCreatePanel(pqRepresentation* display)<br>{<br> pqPipelineSource* s = display->getInput();
<br> vtkSMProxy = s->getProxy();<br> if(QString("MySourceOrFilter") == s->GetXMLName())<br> {<br> return true;<br> }<br> return false;<br>}<br><br><br>Clint<br><br><br>Paul Edwards wrote:<br>> I can now change the display panel for all sources/filters relating to
<br>> a view. Is there a way to set the display panel depending on the<br>> source or filter?<br>><br>> Thanks for all the help so far,<br>> Paul<br>><br>> On 03/01/2008, *Clinton Stimpson* <<a href="mailto:clinton@elemtech.com">
clinton@elemtech.com</a><br>> <mailto:<a href="mailto:clinton@elemtech.com">clinton@elemtech.com</a>>> wrote:<br>><br>> Paul Edwards wrote:<br>> > Does this mean that I don't need to edit the main Paraview code?
<br>> That's correct. You can do this in a plugin.<br>> > Do you have any examples of a plugin which does this?<br>> The closest example is ParaView3/Examples/Plugins/GUIView. But<br>> what you
<br>> want is different enough that it may not help much.<br>> > If not, I would be happy to make one, but I'm still a little<br>> confused<br>> > as to how to implement it. So far I have a plugin for the
<br>> server and<br>> > one for the client, adding a reader and panel to<br>> paraview. Below is<br>> > my CMake file:<br>> ><br>> > 8<----------------------------------------------------------------
<br>> > FIND_PACKAGE(ParaView REQUIRED)<br>> > INCLUDE(${PARAVIEW_USE_FILE})<br>> ><br>> ><br>> > QT4_WRAP_CPP(MOC_SRCS pqMyPanel.h)<br>> > QT4_WRAP_UI(UIC_SRCS
pqMyPanel.ui )<br>> ><br>> > ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS CLASS_NAME pqMyPanel<br>> > XML_NAME MyReader XML_GROUP sources)<br>> ><br>> >
<br>> > ADD_PARAVIEW_PLUGIN(MyReaderSMPlugin "1.0"<br>> > SERVER_MANAGER_XML vtkMyReader.xml<br>> > SERVER_MANAGER_SOURCES vtkMyReader.cxx)<br>
> > ADD_PARAVIEW_PLUGIN(MyReaderGUIPlugin " 1.0"<br>> > GUI_INTERFACES ${IFACES}<br>> > GUI_RESOURCE_FILES pqMyReader.xml<br>> > SOURCES
pqMyPanel.cxx ${MOC_SRCS} ${UIC_SRCS}<br>> > ${IFACE_SRCS})<br>> > ---------------------------------------------------------------->8<br>> ><br>> > Is there a macro to add a display panel so the file can be auto
<br>> > generated, or do I need to create my own subclass for pqPlugin and<br>> > manually add it as one of the interfaces?<br>> As Utkarsh said, you create your own implementation of<br>> pqDisplayPanelInterface, not pqPlugin.
<br>> There's an ADD_PARAVIEW_DISPLAY_PANEL macro that you can follow as an<br>> example. Since you need to make your own<br>> pqDisplayPanelInterface, you<br>> can't call that macro.
<br>> Your implementation of pqDisplayPanelInterface needs to be give to<br>> ADD_PARAVIEW_PLUGIN's GUI_INTERFACES argument so it can put it in the<br>> pqPlugin implementation it creates.<br>>
<br>> Clint<br>><br>> > On 03/01/2008, *Utkarsh Ayachit* <<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a><br>> <mailto:<a href="mailto:utkarsh.ayachit@kitware.com">
utkarsh.ayachit@kitware.com</a>><br>> > <mailto: <a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com</a><br>> <mailto:<a href="mailto:utkarsh.ayachit@kitware.com">utkarsh.ayachit@kitware.com
</a>>>> wrote:<br>> ><br>> > Hi Paul,<br>> ><br>> > In your plugin, you need to implement the<br>> pqDisplayPanelInterface<br>> > (just<br>> > what the pqStandardDisplayPanels in
<br>> pqDisplayProxyEditorWidget.cxx<br>> > does)<br>> > and the register it with the plugin manager. If you look at<br>> > pqDisplayProxyEditorWidget::updatePanel, you'll see that it
<br>> checks for<br>> > all pqDisplayPanelInterface implementations registered and asks<br>> > them to<br>> > create the panel for the source.<br>> ><br>> > Utkarsh
<br>> ><br>> ><br>> > Robert Maynard wrote:<br>> > ><br>> > > Last time I asked the same question, I was told I would<br>> have to<br>> > include
<br>> > > the xmlName of my class to the conditional statement, and<br>> recompile<br>> > > paraview to get custom display panels like TextSource to work.<br>> > >
<br>> > > On Jan 3, 2008 9:12 AM, Paul Edwards <<br>> <a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a> <mailto:<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com
</a>><br>> > <mailto:<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a><br>> <mailto:<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>>><br>> > > <mailto:
<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a><br>> <mailto:<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>><br>> > <mailto:<a href="mailto:paul.m.edwards@gmail.com">
paul.m.edwards@gmail.com</a><br>> <mailto:<a href="mailto:paul.m.edwards@gmail.com">paul.m.edwards@gmail.com</a>>>>> wrote:<br>> > ><br>> > > I am trying to provide a custom display panel for a
<br>> plugin I<br>> > have<br>> > > created. The plugin is for a new source which is a<br>> subclass of<br>> > > vtkMultiBlockPLOT3DReader (the plot3d file is
<br>> generated from<br>> > inputs<br>> > > selected in the object panel) and I would like to<br>> customize the<br>> > > display options for my users.
<br>> > ><br>> > > I can see this is done for "TextSource" and<br>> > "TimeToTextConverter"<br>> > > but when looking through the code (
<br>> pqObjectBuilder.cxx, line<br>> > 400)<br>> > > there is a conditional statement to check specifically<br>> for these<br>> > > sources. Does this mean that it is not possible from a
<br>> > plugin? (Or<br>> > > am I looking in the wrong place here?)<br>> > ><br>> > > Any help would be appreciated, thanks in advance,<br>> > > Paul
<br>> > ><br>> > > PS Great software ;)<br>> > ><br>> > > _______________________________________________<br>> > > ParaView mailing list
<br>> > > <a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a>><br>> <mailto: <a href="mailto:ParaView@paraview.org">
ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a>>><br>> > <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">
ParaView@paraview.org</a>><br>> <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a>>>><br>> > >
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br>> > ><br>> > ><br>> > ><br>> > ><br>
> ><br>> ------------------------------------------------------------------------<br>><br>> > ><br>> > > _______________________________________________<br>> > > ParaView mailing list
<br>> > > <a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a>><br>> <mailto: <a href="mailto:ParaView@paraview.org">
ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a>>><br>> > > <a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview
</a><br>> > < <a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a>><br>> ><br>> ><br>> ><br>> ------------------------------------------------------------------------
<br>> ><br>> > _______________________________________________<br>> > ParaView mailing list<br>> > <a href="mailto:ParaView@paraview.org">ParaView@paraview.org</a> <mailto:<a href="mailto:ParaView@paraview.org">
ParaView@paraview.org</a>><br>> > <a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br>> ><br>><br>><br><br></blockquote></div><br>