Re: [Pyobjc-dev] VTK bindings
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-12-02 18:12:10
|
On Dec 2, 2003, at 12:38 PM, Ronald Oussoren wrote: > > On 2 dec 2003, at 16:23, b.bum wrote: > >> On Dec 2, 2003, at 1:12 AM, Carlos Phillips wrote: >>> 2003-12-02 03:30:46.165 Simple1[1541] PyObjCPointer created: at >>> 0x6d16080 of type >>> {vtkRenderer={?={?={?=^^?i}C{vtkTimeStamp=^^? >>> L}^{vtkSubjectHelper}}^{vtkAssemblyPath}^{vtkPropCollection}iIff^{vtk >>> PropCollection}^{vtkActor2DCollection}^{vtkWindow}[3f][4f][2f][2f][2f >>> ][2i][2i][3f][3f][4f]}^{vtkCamera}^{vtkLight}^{vtkLightCollection}^{v >>> tkCullerCollection}^{vtkActorCollection}^{vtkVolumeCollection}[3f]^{v >>> tkRenderWindow}ffiii*{vtkTimeStamp=^^? >>> L}fii^^{vtkProp}i^^{vtkAssemblyPath}iii[6f]f}8@0:4 >> >> Like Bob said, once a PyObjCPointer is created, you are generally out >> of luck. PyObjC transparently bridged Objective-C. In this case, >> you are asking it to transparently bridge a relatively complex C data >> type. > > The problem is that PyObjCPointer is a not really a wrapped pointer, > when the PyObjCPointer object is created the value pointed-to is > copied into an internal buffer. Most of the time that doesn't work, > vtkRenderer is probably a C++ class and the copied value is invalid. > > I'll put creation of a real pointer wrapper on my todo-list, a generic > version of the types used to wrapped some other pointer types (see > pointer-support.m). > > Is VTK itself wrapped? If so, you could use the functions in > pointer-support.m to convert vtkRenderer* to the Python wrapper from > the VTK wrapper. VTK itself does have python wrappers.. they probably work on OS X by now, but there were problems last time I tried (a long while ago, due to linking issues). -bob |