Commit 916e4bc6 authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot

Merge topic 'no_rendering'

d59a9781 Updated to have better python test code
ca6ca7fb Cleanup a python test and some cmake code
3221bed9 Better support for no rendering
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !819
parents 247e3e88 d59a9781
......@@ -48,3 +48,15 @@ foreach(backend ${VTK_BACKENDS})
endforeach()
endif()
endforeach()
# check for None with rendering turned on
if(VTK_RENDERING_BACKEND STREQUAL "None" AND VTK_Group_Rendering)
message(FATAL_ERROR "VTK_Group_Rendering is on when the rendering backend is set to None. Please either turn off the rendering group or set the rendering backend to a different value")
endif()
if (VTK_RENDERING_BACKEND STREQUAL "None")
# with no backend make a dummy None modules
vtk_module(vtkRenderingNone )
vtk_module(vtkRenderingContextNone )
vtk_module(vtkRenderingVolumeNone )
endif()
......@@ -13,9 +13,13 @@ set(VTK_Group_StandAlone_DOCS "Request building of all stand alone modules (no e
foreach(group ${VTK_GROUPS})
message(STATUS "Group ${group} modules: ${VTK_GROUP_${group}_MODULES}")
# Set the default group option - Rendering ON, and all others OFF.
# Set the default group option - Rendering ON (if there is a backend)
if(${group} MATCHES "^Rendering|^StandAlone")
set(_default ON)
if(${group} MATCHES "^Rendering" AND "None" STREQUAL ${VTK_RENDERING_BACKEND})
set(_default OFF)
else()
set(_default ON)
endif()
else()
set(_default OFF)
endif()
......
......@@ -7,6 +7,7 @@ vtk_module(vtkCommonComputationalGeometry
vtkCommonDataModel
TEST_DEPENDS
vtkTestingCore
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkCommon
)
......@@ -25,11 +25,19 @@ class TestOverloads(Testing.vtkTest):
t.SetMatrix([0,1,0,0, 1,0,0,0, 0,0,-1,0, 0,0,0,1])
self.assertEqual(t.GetMatrix().GetElement(0, 0), 0)
# mixed number of arguments
w = vtk.vtkRenderWindow()
w.SetTileScale(2)
self.assertEqual(w.GetTileScale(), (2,2))
w.SetTileScale(3,4)
self.assertEqual(w.GetTileScale(), (3,4))
fd = vtk.vtkFieldData()
fa = vtk.vtkFloatArray()
fa.SetName("Real")
ia = vtk.vtkIntArray()
ia.SetName("Integer")
fd.AddArray(fa)
fd.AddArray(ia)
a = fd.GetArray("Real")
self.assertIs(a, fa)
i = vtk.mutable(0)
a = fd.GetArray("Integer", i)
self.assertIs(a, ia)
self.assertEqual(i, 1)
def testConstructors(self):
"""Test overloaded constructors"""
......
......@@ -9,6 +9,7 @@ vtk_module(vtkCommonTransforms
vtkCommonMath
TEST_DEPENDS
vtkTestingCore
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkCommon
)
......@@ -3,6 +3,8 @@ vtk_module(vtkFiltersTexture
StandAlone
DEPENDS
vtkFiltersGeneral
TEST_DEPENDS
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkFilters
)
......@@ -3,6 +3,8 @@ vtk_module(vtkIOEnSight
StandAlone
DEPENDS
vtkCommonExecutionModel
TEST_DEPENDS
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkIO
)
......@@ -7,6 +7,8 @@ vtk_module(vtkIOMINC
vtkRenderingCore
vtkFiltersHybrid
vtkIOImage
TEST_DEPENDS
vtkRendering${VTK_RENDERING_BACKEND}
PRIVATE_DEPENDS
vtksys
vtknetcdf
......
......@@ -9,4 +9,5 @@ vtk_module(vtkImagingHybrid
vtkTestingCore
vtkCommonCore
vtkCommonDataModel
vtkRendering${VTK_RENDERING_BACKEND}
)
......@@ -13,6 +13,7 @@ vtk_module(vtkParallelCore
vtkUtilitiesHashSource
TEST_DEPENDS
vtkTestingRendering
vtkRendering${VTK_RENDERING_BACKEND}
KIT
vtkParallel
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment