Perhaps you are referring to actor2D's that lie on the overlay plane and don't move with the rest of the scene during interaction ? If so, to pick it, you should us a vtkPropPicker. Cell pickers won't pick actor2D's<br>
<br><div class="gmail_quote">On Wed, Nov 4, 2009 at 8:16 AM, Cory Quammen <span dir="ltr"><<a href="mailto:cquammen@cs.unc.edu">cquammen@cs.unc.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Piotr,<br>
<br>
Perhaps you could clarify what you mean by moving an actor. It doesn't<br>
sound like you have an interactor style that is manipulating the<br>
actors by picking with the mouse. If you did, however, you could call<br>
PickableOff() on the actor, which will prevent you from picking it and<br>
thereby prevent movement of the actor.<br>
<br>
How exactly are you moving the actors now?<br>
<br>
Cory<br>
<div><div></div><div class="h5"><br>
On Wed, Nov 4, 2009 at 7:21 AM, Piotr Byzia <<a href="mailto:piotr.byzia@gmail.com">piotr.byzia@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I want to set an actor to be movable or non-movable, depending on settings<br>
> which I control through PyQT GUI.<br>
> In other words, having a few actors on the scene I want to set checkboxes in<br>
> my GUI that would freeze a given actor, and the rest of them to react as<br>
> usual to the mouse movements / clicks.<br>
><br>
> Regarding visibility of the actor I'm using GetProperty().SetOpacity(0.0) on<br>
> an instance of any given actor.<br>
> I can't see anything related to movement in the GetProperty() properties, I<br>
> believe it's somewhere else?<br>
><br>
> Here are most important parts of the code I'm using to generate a single<br>
> actor:<br>
><br>
> self.ren = vtk.vtkRenderer()<br>
> self.ren.SetBackground(0, 0, 0)<br>
> self.widget_3d.GetRenderWindow().AddRenderer(self.ren)<br>
><br>
> apd=vtk.vtkAppendPolyData()<br>
><br>
> for i in xrange(len(coordinates)):<br>
> line=vtk.vtkLineSource()<br>
><br>
> line.SetPoint1(coordinates[i][0]) # 1st atom coordinates for a given bond<br>
> line.SetPoint2(coordinates[i][1]) # 2nd atom coordinates for a given bond<br>
> line.SetResolution(21)<br>
> apd.AddInput(line.GetOutput())<br>
><br>
> mapper = vtk.vtkPolyDataMapper()<br>
> mapper.SetInput(apd.GetOutput())<br>
> lines_actor = vtk.vtkActor()<br>
> lines_actor.SetMapper(mapper)<br>
> lines_actor.GetProperty().SetColor(0.7, 0.0, 0.0)<br>
> lines_actor.GetProperty().SetOpacity(1.0)<br>
><br>
> self.ren.AddActor(lines_actor)<br>
><br>
><br>
> I found SetCurrentStyleToTrackballActor(), but I want to control this<br>
> behavior from my GUI.<br>
> Besides, trackball mode is very inconvenient in my case, with molecules in<br>
> "lines" representation (it's hard to pick a single line).<br>
><br>
> Thanks,<br>
> Piotr Byzia<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
Cory Quammen<br>
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)<br>
Department of Computer Science<br>
University of North Carolina at Chapel Hill<br>
<a href="http://www.cs.unc.edu/%7Ecquammen" target="_blank">http://www.cs.unc.edu/~cquammen</a><br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>_________________________________<br>Karthik Krishnan<br>R&D Engineer,<br>Kitware Inc.<br>Ph: +1 5188814919, +91 9538477060<br>Fax: 518 371 4573<br>