<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Hi.<br><br></div>I'm using python-2.6 and vtk-5.10.1.<br><br></div>I have a renderer, to which I'm adding actors.  Some are 3d actors (surfaces, sets of cones), and some are 2d actors (filename text, scalarbar).  To add them, I'm calling:<br><br></div>  self.renderer.AddActor(my_actor)  #  Also tried AddViewProp(my_actor)<br><br></div><div>They seem to add in ok, and they do get rendered.<br><br></div>However, based on user input, sometimes actors need to be removed and new ones added.  So I need to take a look at what's already there, which I do this way:<br><br></div>  c = self.renderer.GetActors()<br></div>  c.InitTraversal()<br></div>  num_items = c.GetNumberOfItems()<br></div><div>  result = []<br></div><div>  for i in xrange(num_items):<br></div><div>      result.append(c.GetNextActor())<br></div><br></div>I notice that when I add a 3d actor and I check before/adter, the num_items increments as expected.<br><br>However, when I add 2d actors (ScalarBar, Text), although they also render, when I check before/after, the num_items does not increment, and they are not returned in the GetActors() list.<br><br></div><div>How do I find out which 2d actors are in the renderer, so that I can optionally remove some of them?<br></div><div><br></div>Should I be doing something different?<br><br>Thanks.<br><br>Greg<br><br></div>p.s.  I've tried calling renderer.GetActors2D(), but then when i try to call GetNextActor() on that, I get "AttributeError: GetNextActor".<br><br></div>