<div class="gmail_quote">On Sat, Feb 27, 2010 at 11:57 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
My only advice is to use wxRenderWindow instead. Regardless of the<br>
name, it actually does provide interaction, and most importantly, it<br>
doesn't crash like wxRenderWindowInteractor does (or at least, not on<br>
my ubuntu 8.04 system).<br>
<br>
The difference between the two classes is that wxRenderWindow does the<br>
interaction purely in python, while wxRenderWindowInteractor uses a<br>
vtkGenericRenderWindowInteractor. (Note: this difference is probably<br>
unrelated to the crash).<br>
<br>
If wxRenderWindow doesn't serve your purpose and you need<br>
wxRenderWindowInteractor, then I suggest that the best way to debug it<br>
is to work your way backward from any instances of SetWindowInfo,<br>
SetParentInfo, or SetNextWindowInfo that appear in the code. Add lots<br>
of print statements to the python code so that you can correlate the<br>
C++ stack trace to a position in the python code. Also, take a look<br>
at vtkXOpenGLRenderWindow.cxx to see what SetWindowId and related<br>
methods are doing under-the-hood.<br>
<br>
Unfortunately I'm not very familiar with wxPython anymore (it's been<br>
around eight years since I've used it), but I hope my limited memory<br>
has provided some help.<br>
<br>
David<br>
<div><div></div><div class="h5"></div></div></blockquote></div><br><div>David G,</div><div><br>Thanks for looking at this. You are right that wxVTKRenderWindow doesn't crash. You didn't say explicitly - did wxVTKRenderWindowInteractor crash on your system, too?</div>
<div><br></div><div>Can you get the interactor from the widget as a vtkRenderWindowInteractor? I tried to do this:</div><div><br></div><div>widget = wxVTKRenderWindow(frame, -1)</div><div><div>style = vtk.vtkInteractorStyleTrackballActor()</div>
<div>widget.GetRenderWindow().GetInteractor().SetInteractorStyle(style)</div><div><br></div><div>but I get:</div><div><br></div><div><div>widget.GetRenderWindow().GetInteractor().SetInteractorStyle(style)</div><div>AttributeError: 'NoneType' object has no attribute 'SetInteractorStyle'</div>
<div><br></div><div>I guess this means that GetInteractor() is returning the equivalent of NULL? If I can get this line to work then I'll be back in familiar VTK land and out of wx land...</div></div></div><div><br clear="all">
Thanks,<br><br>David</div>