Przeglądaj źródła

Use provided "vtk" python package instead custom one "ctkvtk"

Jean-Christophe Fillion-Robin 14 lat temu
rodzic
commit
99c03e4182

+ 1 - 1
Applications/ctkSimplePythonShell/Testing/Python/wrappedVTKQInvokableTest.py

@@ -4,7 +4,7 @@ import sys
 # Importing vtk initializes vtkPythonMap owned by vtkPythonUtil and prevent 
 # call to vtkPythonUtil::GetObjectFromPointer() from segfaulting.
 # PythonQt internally uses vtkPythonUtil to properly wrap/unwrap VTK objects
-from ctkvtk import *
+from vtk import *
 
 t = _testWrappedVTKQInvokableInstance.getTable()
 print t.GetClassName()

+ 1 - 1
Applications/ctkSimplePythonShell/Testing/Python/wrappedVTKSlotTest.py

@@ -4,7 +4,7 @@ import sys
 # Importing vtk initializes vtkPythonMap owned by vtkPythonUtil and prevent 
 # call to vtkPythonUtil::GetObjectFromPointer() from segfaulting.
 # PythonQt internally uses vtkPythonUtil to properly wrap/unwrap VTK objects
-from ctkvtk import *
+from vtk import *
 
 t = _testWrappedVTKSlotInstance.getTable()
 print t.GetClassName()

+ 3 - 3
Libs/Scripting/Python/Core/Python/CMakeLists.txt

@@ -4,9 +4,9 @@ SET(KIT_PYTHON_SCRIPTS
   ctkqt/__init__
   )
   
-IF(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
-  LIST(APPEND KIT_PYTHON_SCRIPTS ctkvtk/__init__)
-ENDIF()
+#IF(CTK_LIB_Scripting/Python/Core_PYTHONQT_USE_VTK)
+#  LIST(APPEND KIT_PYTHON_SCRIPTS ctkvtk/__init__)
+#ENDIF()
 
 IF(CTK_WRAP_PYTHONQT_LIGHT OR CTK_WRAP_PYTHONQT_FULL)
 

+ 0 - 30
Libs/Scripting/Python/Core/Python/ctkvtk/__init__.py

@@ -1,30 +0,0 @@
-""" This module loads a subset of the VTK classes into its namespace."""
-
-import os
-
-__kits_to_load = [
-"Common",
-"Filtering",
-"Rendering",
-"Graphics",
-"Hybrid",
-"Views",
-"Infovis",
-"Widgets",
-"Imaging",
-"IO"]
-
-prefix = 'vtk'
-if os.name == 'posix': prefix = "libvtk"
-
-for kit in __kits_to_load:
-  try:
-    exec "from %s%sPython import *" % (prefix, kit)
-  except ImportError as detail:
-     print detail
-  
-from vtk.util.vtkVariant import *
-from vtk import vtkImageScalarTypeNameMacro
-
-# Removing things the user shouldn't have to see.
-del __kits_to_load, os