<div dir="ltr">Hi Utkarsh,<div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">> <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">There's was never meant to be any order matching between the VTK port numbers and input ports provided by<span> </span></span><span class="gmail-il" style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">pqPipelineFilter</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">... </span>If there's a convincing reason to preserve it, we can surely fix it, however.</div></div><div>I finally found one. :) When I wrap my filter in a Paraview Custom filter, if I use a default wizard's name 'Input' it changes the input name and I can't search by name with <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">pqPipelineFilter</span> anymore<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">.</span></div><div><br></div><div>Regards,</div><div>Maxim</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-04 9:52 GMT-04:00 Maxim Torgonskiy <span dir="ltr"><<a href="mailto:kriolog@gmail.com" target="_blank">kriolog@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><span class=""><span style="color:rgb(84,84,84);font-family:roboto,arial,sans-serif;font-size:13.696px">Sounds convincing, I'll switch to named access. Thank you for the clarification!</span><br></span><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">Le 3 août 2017 11:14, "Utkarsh Ayachit" <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>> a écrit :<br type="attribution"><blockquote class="m_7351811195840363648quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">While the mismatch may be confusing, ParaView deliberately opted for "named" access to the inputs since the proxy mechanism does provide ability to hide/ignore/change input ports. For example, proxy may not even have input properties for all input ports if some of them are optional.</div><div class="m_7351811195840363648elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 2, 2017 at 6:19 PM, Maxim Torgonskiy <span dir="ltr"><<a href="mailto:kriolog@gmail.com" target="_blank">kriolog@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>Ok, I see. I just supposed that the order of ports is the same. Before, in my paraview plugin I used everywhere access by index (for both VTK and <span style="font-size:12.8px">pqPipeline* parts</span>) and now I should mix it with access by input name which is less consistent.</div><div><br></div>Thanks,<div>Maxim<br><div><br></div><div><br></div></div></div><div class="m_7351811195840363648m_-3062135254804010409HOEnZb"><div class="m_7351811195840363648m_-3062135254804010409h5"><div class="gmail_extra"><br><div class="gmail_quote">2017-08-02 17:39 GMT-04: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">There's was never meant to be any order matching between the VTK port numbers and input ports provided by pqPipelineFilter. The latter indeed used a map internally using the property name as the key for the map (hence the change in order).<div><br></div><div>If there's a convincing reason to preserve it, we can surely fix it, however.</div><div><br></div><div>Utkarsh</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_7351811195840363648m_-3062135254804010409m_-3350617186285952011h5">On Wed, Aug 2, 2017 at 4:08 PM, Maxim Torgonskiy <span dir="ltr"><<a href="mailto:kriolog@gmail.com" target="_blank">kriolog@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_7351811195840363648m_-3062135254804010409m_-3350617186285952011h5"><div dir="ltr">Hello,<div><br></div><div>It seems that there's a bug in pqPipelineFilter::getInputP<wbr>ortName(int). I have a vtk filter which has 3 inputs and when I try to access the inputs with pqPipelineFilter the function getInputPortName doesn't respect their order:</div><div><br></div><div>.xml :</div><div><div><?xml version="1.0"?></div><div><ServerManagerConfiguration></div><div> <ProxyGroup name="filters"></div><div> <SourceProxy class="Dummy" name="Dummy"></div><div> <InputProperty</div><div> name="Zero"</div><div> port_index="0"</div><div> command="SetInputConnection"></div><div> <ProxyGroupDomain name="groups"></div><div> <Group name="sources"/></div><div> <Group name="filters"/></div><div> </ProxyGroupDomain></div><div> <DataTypeDomain name="input_type"></div><div> <DataType value="vtkPolyData"/></div><div> </DataTypeDomain></div><div> </InputProperty></div><div> <InputProperty</div><div> name="One"</div><div> port_index="1"</div><div> optional="1"</div><div> command="SetInputConnection"></div><div> <ProxyGroupDomain name="groups"></div><div> <Group name="sources"/></div><div> <Group name="filters"/></div><div> </ProxyGroupDomain></div><div> <DataTypeDomain name="input_type"></div><div> <DataType value="vtkPointSet"/></div><div> </DataTypeDomain></div><div> </InputProperty></div><div> <InputProperty</div><div> name="Two"</div><div> port_index="2"</div><div> optional="1"</div><div> command="SetInputConnection"></div><div> <ProxyGroupDomain name="groups"></div><div> <Group name="sources"/></div><div> <Group name="filters"/></div><div> </ProxyGroupDomain></div><div> <DataTypeDomain name="input_type"></div><div> <DataType value="vtkPolyData"/></div><div> </DataTypeDomain></div><div> </InputProperty></div><div> </SourceProxy></div><div> </ProxyGroup></div><div></ServerManagerConfiguration></div></div><div><br></div><div>.cxx :</div><div><div>int Dummy::RequestData(</div><div> vtkInformation *vtkNotUsed(info),</div><div> vtkInformationVector **inputVector,</div><div> vtkInformationVector *outputVector)</div><div>{</div><div> pqPipelineFilter* self_pqfilter = qobject_cast<pqPipelineFilter*<wbr>>(pqActiveObjects::instance().<wbr>activeSource());</div><div> Q_ASSERT(self_pqfilter);</div><div><br></div><div> for(int i = 0; i < GetNumberOfInputPorts(); ++i)</div><div> qDebug() << self_pqfilter->getInputPortNam<wbr>e(i);</div><div><br></div><div> return 1;</div><div>}</div></div><div><br></div><div>output :</div><div>"One"<br></div><div>"Two"</div><div>"Zero"</div><div><br></div><div><br></div><div>A minimal reproducible example is attached.<br></div><div> </div><div>Regards,</div><div>Maxim</div><div><br></div></div>
<br></div></div>______________________________<wbr>_________________<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/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/paraview-develope<wbr>rs</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>