From: Robin Dunn Date: Thu, 2 May 2002 02:49:15 +0000 (+0000) Subject: Removed wxVTKRenderWindow since VTK now includes a much better python X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f44602beb7f548ce44237cdb417b7a994b54b901 Removed wxVTKRenderWindow since VTK now includes a much better python module that allows you to use VTK in a wxPython window. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index fd626ec8be..4cc8d92819 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -20,72 +20,6 @@ import images #--------------------------------------------------------------------------- -## _treeList = [ -## ('New since last release', ['wxGenericDirCtrl', -## 'wxImageFromStream', -## 'RowColSizer', -## 'Unicode', -## 'wxFileHistory', -## ]), - -## ('Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame', -## 'wxGrid', 'wxSashWindow', -## 'wxScrolledWindow', 'wxSplitterWindow', -## 'wxStatusBar', 'wxNotebook', -## 'wxHtmlWindow', -## 'wxStyledTextCtrl_1', 'wxStyledTextCtrl_2', -## 'wxPopupWindow', -## 'wxDynamicSashWindow', -## ]), - -## ('Common Dialogs', ['wxColourDialog', 'wxDirDialog', 'wxFileDialog', -## 'wxSingleChoiceDialog', 'wxTextEntryDialog', -## 'wxFontDialog', 'wxPageSetupDialog', 'wxPrintDialog', -## 'wxMessageDialog', 'wxProgressDialog', 'wxFindReplaceDialog', -## ]), - -## ('Controls', ['wxButton', 'wxCheckBox', 'wxCheckListBox', 'wxChoice', -## 'wxComboBox', 'wxGauge', 'wxListBox', 'wxListCtrl', 'VirtualListCtrl', -## 'wxTextCtrl', -## 'wxTreeCtrl', 'wxSpinButton', 'wxSpinCtrl', 'wxStaticText', -## 'wxStaticBitmap', 'wxRadioBox', 'wxSlider', 'wxToolBar', -## 'wxCalendarCtrl', 'wxToggleButton', -## 'wxEditableListBox', 'wxLEDNumberCtrl', -## ]), - -## ('Window Layout', ['wxLayoutConstraints', 'LayoutAnchors', 'Sizers', 'XML_Resource', -## 'RowColSizer', -## ]), - -## ('Miscellaneous', [ 'DragAndDrop', 'CustomDragAndDrop', 'URLDragAndDrop', -## 'FontEnumerator', -## 'wxTimer', 'wxValidator', 'wxGLCanvas', 'DialogUnits', -## 'wxImage', 'wxMask', 'PrintFramework', 'wxOGL', -## 'PythonEvents', 'Threads', -## 'ActiveXWrapper_Acrobat', 'ActiveXWrapper_IE', -## 'wxDragImage', "wxProcess", "FancyText", "OOR", "wxWave", -## 'wxJoystick', 'DrawXXXList', 'ErrorDialogs', 'wxMimeTypesManager', -## 'ContextHelp', 'SplitTree', 'Unicode', 'wxFileHistory', -## ]), - -## ('wxPython Library', ['Layoutf', 'wxScrolledMessageDialog', -## 'wxMultipleChoiceDialog', 'wxPlotCanvas', 'wxFloatBar', -## 'wxCalendar', 'wxMVCTree', 'wxVTKRenderWindow', -## 'FileBrowseButton', 'GenericButtons', 'wxEditor', -## 'ColourSelect', 'ImageBrowser', -## 'infoframe', 'ColourDB', 'PyCrust', 'PyCrustWithFilling', -## 'TablePrint', -## 'wxRightTextCtrl', -## ]), - -## ('Cool Contribs', ['pyTree', 'hangman', -## #'SlashDot', -## 'XMLtreeview' -## ]), - -## ] - - _treeList = [ # new stuff ('New since last release', [ @@ -240,7 +174,6 @@ _treeList = [ 'ActiveXWrapper_IE', 'wxGLCanvas', 'wxPlotCanvas', - 'wxVTKRenderWindow', ]), # pyTree, hangman, ... in the samples dir diff --git a/wxPython/demo/wxVTKRenderWindow.py b/wxPython/demo/wxVTKRenderWindow.py deleted file mode 100644 index 520f50b2aa..0000000000 --- a/wxPython/demo/wxVTKRenderWindow.py +++ /dev/null @@ -1,54 +0,0 @@ - -from wxPython.wx import * -try: - from wxPython.lib import vtk - haveVTK = true -except ImportError: - haveVTK = false - -#---------------------------------------------------------------------- - -def MakeCone(vtkwin): - cone = vtk.vtkConeSource() - cone.SetResolution(80) - coneMapper = vtk.vtkPolyDataMapper() - coneMapper.SetInput(cone.GetOutput()) - coneActor = vtk.vtkActor() - coneActor.SetMapper(coneMapper) - - ren = vtk.vtkRenderer() - vtkwin.GetRenderWindow().AddRenderer(ren) - ren.AddActor(coneActor) - - -#---------------------------------------------------------------------- - -def runTest(frame, nb, log): - if haveVTK: - f = wxFrame(frame, -1, "wxVTKRenderWindow", size=(450, 300), - style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) - win = vtk.wxVTKRenderWindow(f, -1) - MakeCone(win) - - f.Show(true) - frame.otherWin = f - return None - - - else: - wxMessageBox("Unable to import VTK, which is a required component\n" - "of this demo. You need to download and install the\n" - "Python extension module for VTK from http://www.kitware.com/", - "Import Error") - return None - -#---------------------------------------------------------------------- - - -overview = """\ -wxVTKRenderWindow is a wrapper around the vtkRenderWindow from the -VTK Visualization Toolkit. The VTK Python extensions are required, -they can be obtained from http://www.kitware.com/ where you can also -find some nifty pictures and stuff. - -""" diff --git a/wxPython/wxPython/lib/vtk.py b/wxPython/wxPython/lib/vtk.py index 860b30ad45..ad784dba0b 100644 --- a/wxPython/wxPython/lib/vtk.py +++ b/wxPython/wxPython/lib/vtk.py @@ -1,3 +1,17 @@ +""" +VTK is now including a package for using VTK with wxPython, so this +module is now officially nothing but ancient history. If for some +strange reason you really need this code (I don't know why, it didn't +work all that well anyway,) then just remove the triple quotes below. +I'm told that the module from Kitware is excellent and so you should +really use it. See the URL below to get a copy from CVS. + +http://public.kitware.com/cgi-bin/cvsweb.cgi/VTK/Wrapping/Python/vtk/wx/ +""" + +print __doc__ + +""" #---------------------------------------------------------------------- # Name: wxPython.lib.vtk # Purpose: Provides a wrapper around the vtkRenderWindow from the @@ -552,3 +566,4 @@ class wxVTKRenderWindow(wxVTKRenderWindowBase): self._PickedAssembly.SetProperty(self._PickedProperty) self.Render() +"""