Many thanks Jeff,<br><br>For the moment I use the same revision as in the latest release version of paraview, I will updata my revision then<br>Can you explain why, when there is only a single actor(from vtkUnstructuredGrid), the returned vtkSelection contains a lot of vtkSelectionNode objects, with only a single tuple in their selection data ?<br>
<br>Olivier<br><br><div class="gmail_quote">On Tue, Feb 2, 2010 at 2:43 PM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</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;">
This needs a wrapper-friendly API. In C++ you would do<br>
<br>
vtkProp* p = vtkProp::SafeDownCast(node->GetProperties()->Get(vtkSelectionNode::PROP()));<br>
<br>
It would be nice to be able to do the following<br>
<br>
vtkProp* p = node->GetProp();<br>
<br>
which would be accessible from wrapped languages.<br>
<br>
...<br>
<br>
I've added GetProp, SetProp to vtkSelectionNode in CVS head.<br>
<br>
Patch title (first comment line): ENH: Adding Get/SetProp to vtkSelectionNode.<br>
Autocommit<br>
cvs commit -F .msg 'Filtering/vtkSelectionNode.cxx'<br>
'Filtering/vtkSelectionNode.h'<br>
Committer: Jeffrey Baumes <<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>><br>
/cvsroot/VTK/VTK/Filtering/vtkSelectionNode.cxx,v <--<br>
Filtering/vtkSelectionNode.cxx<br>
new revision: 1.5; previous revision: 1.4<br>
/cvsroot/VTK/VTK/Filtering/vtkSelectionNode.h,v <--<br>
Filtering/vtkSelectionNode.h<br>
new revision: 1.6; previous revision: 1.5<br>
Committed successfully to CVS<br>
<br>
Jeff<br>
<div><div></div><div class="h5"><br>
On Tue, Feb 2, 2010 at 4:09 AM, Olivier Feys <<a href="mailto:pytkvtk@gmail.com">pytkvtk@gmail.com</a>> wrote:<br>
> I want to handle selection through multiple vtkUnstructuredGrids by picking<br>
> a particular cell or by making a selection with a rubberband interactor.<br>
> I can easily create a vtkSelectionNode from a picked cell and add a<br>
> vtkSelectionNode to a vtkSelection.<br>
><br>
> The problem is when I get a vtkSelection made on several actors.props. I<br>
> can't find any example where the prop/actor is got from the vtkSelectionNode<br>
> object.<br>
> How can I, from a selection returned by the vtkHardwareSelector, get, for<br>
> each vtkSelectionNode, the actor that it belongs to ?<br>
> When I print the vtkSelectionNode, I can see the property PROP_ID but I<br>
> can't use it.<br>
> By the way, if I have only one actor, the returned vtkSelection contains<br>
> always more than one vtkSelectionNode. Why is that ?<br>
><br>
</div></div>> _______________________________________________<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>
<font color="#888888"><br>
<br>
<br>
--<br>
Jeff Baumes, Ph.D.<br>
R&D Engineer, Kitware Inc.<br>
(518) 881-4932<br>
<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a><br>
</font></blockquote></div><br>