From f8f6e3c27f5126510bed5321cf6e27ca35643af1 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 18 Nov 2010 13:26:19 +0000 Subject: [PATCH] merge from BR_PV310_PORTING 18/11/2010 --- src/SALOME_PY/SalomePy.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/SALOME_PY/SalomePy.cxx b/src/SALOME_PY/SalomePy.cxx index 5fbdab8b2..f2a599327 100755 --- a/src/SALOME_PY/SalomePy.cxx +++ b/src/SALOME_PY/SalomePy.cxx @@ -49,6 +49,8 @@ #include #include +#define VTK_XVERSION (VTK_MAJOR_VERSION*10000+VTK_MINOR_VERSION*100+VTK_BUILD_VERSION) + /*! \brief Python wrappings for VTK viewer of the SALOME desktop. @@ -206,7 +208,11 @@ public: ::GetVTKViewWindow( myCreate ? __Create : __FindOrCreate ); if( aVTKViewWindow && aPyClass ) { vtkRenderer* aVTKObject = aVTKViewWindow->getRenderer(); +#if VTK_XVERSION < 50700 myResult = PyVTKObject_New( aPyClass, aVTKObject ); +#else + myResult = PyVTKObject_New( aPyClass, NULL, aVTKObject ); +#endif } } }; @@ -255,7 +261,11 @@ public: ::GetVTKViewWindow( myCreate ? __Create : __FindOrCreate ); if( aVTKViewWindow && aPyClass ) { vtkRenderWindow* aVTKObject = aVTKViewWindow->getRenderWindow(); +#if VTK_XVERSION < 50700 myResult = PyVTKObject_New( aPyClass, aVTKObject ); +#else + myResult = PyVTKObject_New( aPyClass, NULL, aVTKObject ); +#endif } } }; @@ -304,7 +314,11 @@ public: ::GetVTKViewWindow( myCreate ? __Create : __FindOrCreate ); if( aVTKViewWindow && aPyClass ) { vtkRenderWindowInteractor* aVTKObject = aVTKViewWindow->getInteractor(); +#if VTK_XVERSION < 50700 myResult = PyVTKObject_New( aPyClass, aVTKObject ); +#else + myResult = PyVTKObject_New( aPyClass, NULL, aVTKObject ); +#endif } } }; -- 2.39.2