[vtkusers] wxPython+Cocoa+VTK?

David Gobbi david.gobbi at gmail.com
Sat Dec 4 19:22:03 EST 2010


Hi Scott,

It's good to hear that it is working.  You should get in touch with the
people who added the WindowRemap() calls to the code (just look through the
git history for their emails).  You might be able to work with them to
create a fix that works for everyone.

  David


On Sat, Dec 4, 2010 at 4:19 PM, Scott Harris <scottrharris at gmail.com> wrote:

> OK, I had to:
>
> 1. Hand code the values for WX_USE_GLCANVAS and WX_USE_X_CAPTURE. I need to
> go back and see why the try/except stuff was crashing. I was in a hurry for
> something to work.
>
> 2. Do some renaming (added "wx." all over) since "from wx import *" fails,
> but import wx works. I need to see understand why from wx import * fails for
> me, but that's a question for the wxGang.
>
> 3. Rename vtkpython to vtk.
>
> It seems to work, but the size of the cone and background are very small
> and only sit in the upper right hand corner of the window. Resizing the
> window makes everything snap together, so there's an initialization problem.
>
> Anyhow, I'll fix that size issue on initialization and just use this old,
> modified version.
>
> Is this a bug that should be fixed so that the current wxVTKRenderWindow
> stuff will work out of the box for OS X users?
>
> -Scott
>
>
>
>
> On Dec 4, 2010, at 3:10 PM, David Gobbi wrote:
>
> You can try using an older version of wxVTKRenderWindowPython.py that
> doesn't call "WindowRemap":
>
> http://vtk.org/gitweb?p=VTK.git;a=blob;f=Wrapping/Python/vtk/wx/wxVTKRenderWindow.py;hb=3eda1ca3
>
> The WindowRemap() method has never been implemented for either the
> vtkCarbonRenderWindow or the vtkCocoaRenderWindow.
>
>   David
>
>
> On Sat, Dec 4, 2010 at 2:30 PM, Scott Harris <scottrharris at gmail.com>wrote:
>
>> I compiled wxPython for Cocoa. The demos seem to work fine.
>> -Scott
>>
>> On Sat, Dec 4, 2010 at 7:25 AM, Lassi Paavolainen
>> <lassi.paavolainen at jyu.fi> wrote:
>> > Hi Scott,
>> >
>> > Is your wxPython for Cocoa as well? I only found binaries for wxPython
>> 2.9
>> > for Cocoa in Python 2.7 from wxPython website. Did you get those
>> somewhere
>> > else or built yourself?
>> >
>> > Sorry, can't really help on this one, but I'm also interested to get
>> these
>> > working. My plan is to have Cocoa+wxPython+VTK+ITK in 64-bits. I've
>> tried
>> > that combination in 32-bit and Carbon about a year ago without much of
>> > success.
>> >
>> > Cheers,
>> > Lassi
>> >
>> > On Fri, 3 Dec 2010, Scott Harris wrote:
>> >
>> >> Is this combination supposed to work?
>> >>
>> >> I've installed VTK 5.6.1 (64 bit, cocoa, wrap python) and wxPython
>> 2.9.1.1
>> >> with the system Python 2.6.1 in OS X 10.6 and when I run:
>> >>
>> >> python wxVTKRenderWindow.py
>> >>
>> >> I get the renderer in a separate window from the wx.Frame. It fails
>> with
>> >> the following error and sometimes a seg fault.
>> >>
>> >> Warning: In
>> >> /Users/scott/Documents/VTKStuff/VTK/Rendering/vtkCocoaRenderWindow.h,
>> line
>> >> 112
>> >> vtkCocoaRenderWindow (0x10306da60): SetNextWindowInfo not implemented
>> >> (WindowRemap not implemented).
>> >>
>> >> Warning: In
>> >> /Users/scott/Documents/VTKStuff/VTK/Rendering/vtkCocoaRenderWindow.mm,
>> line
>> >> 944
>> >> vtkCocoaRenderWindow (0x10306da60): Can't remap the window.
>> >>
>> >> Any ideas?
>> >>
>> >> Should I move to 32 bits, Carbon, and wxPython for Carbon?
>> >>
>> >> What I would really like is PyObjC+Cocoa+VTK, but I haven't been able
>> to
>> >> get that combination to work since OS X 10.4.
>> >>
>> >> Thanks,
>> >> -Scott
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101204/d7f18a47/attachment.htm>


More information about the vtkusers mailing list