[Paraview-developers] vtkSMSessionProxyManager::getProxies bug

Cory Quammen cory.quammen at kitware.com
Thu Jul 24 09:29:49 EDT 2014


Mathieu,

It looks like line 488 should be

if(ids.find(it3->GetPointer()->Proxy->GetGlobalID()) == ids.end())

otherwise nothing ever gets added to the set or collection. Does that
sound right to you? If so, I'll push a patch.

Thanks,
Cory


On Thu, Jul 24, 2014 at 3:36 AM, Mathieu Westphal
<mathieu.westphal at gmail.com> wrote:
> Hello
>
> It seems to me there is a bug in
>  vtkSMSessionProxyManager::getProxies
>
> I try to recover scalar_bar representation so , i create one in the gui, then :
>
> vtkSMSessionProxyManager* pxm = vtkSMProxyManager::GetProxyManager()->GetActiveSessionProxyManager();
> vtkSmartPointer<vtkCollection> legends = vtkSmartPointer<vtkCollection>::New();
> pxm->GetProxies( LEGEND_REGISTERED_GROUP_NAME.toAscii().data(), legends );
> printf("Nb: %i %i\n", legends->GetNumberOfItems(), pxm->GetNumberOfProxies( "scalar_bars" ) );
>
>
>
> Give me :
> Nb: 0 1
>
> THe proxy is not recovered in the vtkCollection because of this line  ( vtkSMSessionProxyManager.cxx ):
> 488          if(ids.find(it3->GetPointer()->Proxy->GetGlobalID()) != ids.end())
>
> I'm using a work around, wich works well :
>      unsigned int nbLegend =  pxm->GetNumberOfProxies( "scalar_bars" );
>      for(unsigned int i = 0; i < nbLegend; i++ )
>      {
>          QString tmp ( pxm->GetProxyName("scalar_bars", i ) );
>          vtkSMProxy* proxy = pxm->GetProxy( "scalar_bars", tmp.toAscii().data() );
>          printf("%s %i\n", tmp.toAscii().data(), proxy );
>      }
>
>
> Mathieu
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers


More information about the Paraview-developers mailing list