The wxVTKRenderWindow class is a pure python object (built from
lower-level VTK/Python calls), hence you don't need a new dll to run it.
Just grab a copy from the VTK CVS-source tree (or a VTK4.1 source
release tree); it's in "VTK/Wrapping/Python/wxVTKRenderWindow.py".
Stick this file in the appropriate place in your VTK tree (hopefully
somewhere in your PYTHONPATH, so python can find it), and you should be
able to use it directly.
I am testing this with wxVTKRenderWindowInteractor.py:
#If I use the dlls that are provided by kitware I get:
···
#
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 36, in ?
# import vtk
# File
"d:\python22\lib\site-packages\vtkNightly\Wrapping\Python\vtk\__init__.py",
line 7, in ?
# from common import *
# File
"d:\python22\lib\site-packages\vtkNightly\Wrapping\Python\vtk\common.py",
line 9, in ?
# from vtkCommonPython import *
#ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
This is because they are build for Python 2.1
If I use the dlls provided by Les Schaffer for Python 2.2 and vtk 4.x I get:
#Traceback (most recent call last):
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 361, in ?
# wxVTKRenderWindowInteractorConeExample()
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 335, in wxVTKRenderWindowInteractorConeExample
# widget = wxVTKRenderWindowInteractor(frame, -1)
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 155, in __init__
# self._Iren = vtk.vtkGenericRenderWindowInteractor()
#AttributeError: 'module' object has no attribute
'vtkGenericRenderWindowInteractor'
(which should be found in vtkRenderingPython.dll)
Of course I can use wxVTKRenderWindow, but I have to use the ..Interactor
because I want to
have two RenderWindows inside a wxSplitterWindow.
Marcus
Sorry, I misunderstood your question. I was not aware of the existence
of the wxVTKRenderWindowInteractor class. It must be a fairly new
addition.
Why do you need the Interactor in order to put two render windows in a
wxSplitterWindow?
Bryan
···
On Tue, 2002-07-16 at 15:20, Marcus Stojek wrote:
>The wxVTKRenderWindow class is a pure python object (built from
>lower-level VTK/Python calls), hence you don't need a new dll to run it.
>Just grab a copy from the VTK CVS-source tree (or a VTK4.1 source
>release tree); it's in "VTK/Wrapping/Python/wxVTKRenderWindow.py".
> Stick this file in the appropriate place in your VTK tree (hopefully
>somewhere in your PYTHONPATH, so python can find it), and you should be
>able to use it directly.
I am testing this with wxVTKRenderWindowInteractor.py:
#If I use the dlls that are provided by kitware I get:
#
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 36, in ?
# import vtk
# File
"d:\python22\lib\site-packages\vtkNightly\Wrapping\Python\vtk\__init__.py",
line 7, in ?
# from common import *
# File
"d:\python22\lib\site-packages\vtkNightly\Wrapping\Python\vtk\common.py",
line 9, in ?
# from vtkCommonPython import *
#ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
This is because they are build for Python 2.1
If I use the dlls provided by Les Schaffer for Python 2.2 and vtk 4.x I get:
#Traceback (most recent call last):
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 361, in ?
# wxVTKRenderWindowInteractorConeExample()
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 335, in wxVTKRenderWindowInteractorConeExample
# widget = wxVTKRenderWindowInteractor(frame, -1)
# File
"D:\Python22\Lib\site-packages\vtkNightly\Wrapping\Python\vtk\wx\wxVTKRender
WindowInteractor.py", line 155, in __init__
# self._Iren = vtk.vtkGenericRenderWindowInteractor()
#AttributeError: 'module' object has no attribute
'vtkGenericRenderWindowInteractor'
(which should be found in vtkRenderingPython.dll)
Of course I can use wxVTKRenderWindow, but I have to use the ..Interactor
because I want to
have two RenderWindows inside a wxSplitterWindow.
Marcus
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwindows.org
http://lists.wxwindows.org/mailman/listinfo/wxpython-users
--
Bryan Cole
Teraview Ltd., 302-304 Cambridge Science Park, Milton Road, Cambridge
CB4 0WG, United Kingdom.
tel: +44 (1223) 435380 / 435386 (direct-dial) fax: +44 (1223) 435382