]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix bug of ParaView 3.98 porting - correct test script
authorvsr <vsr@opencascade.com>
Tue, 30 Apr 2013 03:54:48 +0000 (03:54 +0000)
committervsr <vsr@opencascade.com>
Tue, 30 Apr 2013 03:54:48 +0000 (03:54 +0000)
src/SALOME_SWIG/examplevtk1.py

index a27ef391e6768e557ec3584523701f2775112714..988e5ade049cda5306c84656fcbe4d880b0e0eed 100755 (executable)
 import os
 import libSalomePy
 from vtk import *
-
-try:
-    from libvtkRenderingPython import *
-except:
-    from vtkRenderingPython import *
+from vtkRenderingCorePython import *
+from vtkFiltersSourcesPython import *
 
 # get the "vtkRenderer": an OpenGL rendering context
 ren = libSalomePy.getRenderer()
@@ -41,7 +38,7 @@ ren = libSalomePy.getRenderer()
 cone = vtkConeSource()
 cone.SetResolution(8)
 coneMapper = vtkPolyDataMapper()
-coneMapper.SetInput(cone.GetOutput())
+coneMapper.SetInputConnection(cone.GetOutputPort(0))
 coneActor = vtkActor()
 coneActor.SetMapper(coneMapper)
 
@@ -49,5 +46,3 @@ coneActor.SetMapper(coneMapper)
 ren.AddActor(coneActor)
 
 libSalomePy.fitAll()
-
-iren = libSalomePy.getRenderWindowInteractor()