Disabling interaction of a renderer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Disabling interaction of a renderer

Slaughter, Andrew E
I am creating an application that will require the user to "activate" an object prior to being able to manipulate it via mouse movements. The attached script is simple (python2.7;vtk7.1;MacOS10.13.4) demonstration with two renderers (left and right). Pressing "t" toggles/highlights the contents.

However, when the left side is highlighted I can still interact with the right side. How can I disable the interaction for a particular renderer?

Thanks for the help,

Andrew

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

dual_toggle.py (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disabling interaction of a renderer

Slaughter, Andrew E
After digging around a bit I figured out how to solve the problem, the complete script with a working version is attached. In short the vtkRenderWindowInteractor::FindPokedRenderer always returns a renderer regardless of the Set/GetInteractive state. Therefore, I created a "background" renderer with layer 0 with the others on layer 1. Using SetInteractive(False) on the two layer 1 renders that causes the background to be the fallback renderer for the interactor, which produces the desired behavior.

Thanks to anyone who might of took time to look at my problem.

On Wed, Jun 20, 2018 at 9:13 AM, Slaughter, Andrew E <[hidden email]> wrote:
I am creating an application that will require the user to "activate" an object prior to being able to manipulate it via mouse movements. The attached script is simple (python2.7;vtk7.1;MacOS10.13.4) demonstration with two renderers (left and right). Pressing "t" toggles/highlights the contents.

However, when the left side is highlighted I can still interact with the right side. How can I disable the interaction for a particular renderer?

Thanks for the help,

Andrew


_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

dual_toggle.py (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Disabling interaction of a renderer

David E DeMarle
Thanks for posting a solution Andrew.

David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Thu, Jun 21, 2018 at 4:12 PM Slaughter, Andrew E <[hidden email]> wrote:
After digging around a bit I figured out how to solve the problem, the complete script with a working version is attached. In short the vtkRenderWindowInteractor::FindPokedRenderer always returns a renderer regardless of the Set/GetInteractive state. Therefore, I created a "background" renderer with layer 0 with the others on layer 1. Using SetInteractive(False) on the two layer 1 renders that causes the background to be the fallback renderer for the interactor, which produces the desired behavior.

Thanks to anyone who might of took time to look at my problem.

On Wed, Jun 20, 2018 at 9:13 AM, Slaughter, Andrew E <[hidden email]> wrote:
I am creating an application that will require the user to "activate" an object prior to being able to manipulate it via mouse movements. The attached script is simple (python2.7;vtk7.1;MacOS10.13.4) demonstration with two renderers (left and right). Pressing "t" toggles/highlights the contents.

However, when the left side is highlighted I can still interact with the right side. How can I disable the interaction for a particular renderer?

Thanks for the help,

Andrew

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers

_______________________________________________
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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers