[Paraview] source name in python view

Felipe Bordeu felipebordeu at gmail.com
Thu Oct 13 09:56:08 EDT 2016


thanks for the hint but m'i unable to find a way to map the filter id to
the data ID
(inside the python view script )

def Render(View,figure):
  from paraview.simple import *
  names = { x[1]:x[0] for x in GetSources().keys()}
  print(names)
  for i in xrange(view.GetNumberOfVisibleDataObjects()):
      print(view.GetVisibleRepresentation(i).GetUniqueIdentifier())



2016-10-13 10:14 GMT+02:00 <postgurke at web.de>:

> Hi Felipe
>
> Would GetSources(), maybe along with FindSource and SetActiveSource help
> you?
> ALL=GetSources() gives you a dictionary of all sources in your session.
>
> Cheers
> Venke
>
>
>
> > Felipe Bordeu <felipebordeu at gmail.com> hat am 12. Oktober 2016 um 15:15
> > geschrieben:
> >
> >
> > I use python view to plot some data allons my 3D visualisation. Can I get
> > the name of the source inside the 'python view script' so I can know to
> > which source belongs each line on my plot?.
> > (I know I can set the name of a source using  RenameSource('Good Result
> ')
> > )
> >
> >
> > Felipe
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20161013/10bc09ca/attachment.html>


More information about the ParaView mailing list