diff --git a/Remoting/Application/Testing/Python/HTGReflectionFilterBackwardsCompatibilityTest.py b/Remoting/Application/Testing/Python/HTGReflectionFilterBackwardsCompatibilityTest.py index 969657dede92bd589dc7c6c62003694c80cffd6c..63a3785358f77926042dc1eb6d283ea511f3b3be 100644 --- a/Remoting/Application/Testing/Python/HTGReflectionFilterBackwardsCompatibilityTest.py +++ b/Remoting/Application/Testing/Python/HTGReflectionFilterBackwardsCompatibilityTest.py @@ -9,6 +9,9 @@ hyperTreeGridRandom = HyperTreeGridRandom() hyperTreeGridAxisReflection = HyperTreeGridAxisReflection(Input=hyperTreeGridRandom) assert(type(hyperTreeGridAxisReflection).__name__ == "AxisAlignedReflectionFilter") +hyperTreeGridAxisReflection.PlaneNormal = 'Z Axis' +assert(hyperTreeGridAxisReflection.ReflectionPlane.Normal == [0.0, 0.0, 1.0]) + hyperTreeGridAxisReflection.PlaneNormal = 7 hyperTreeGridAxisReflection.PlanePosition = 2 diff --git a/Remoting/Application/Testing/Python/ReflectBackwardsCompatibilityTest.py b/Remoting/Application/Testing/Python/ReflectBackwardsCompatibilityTest.py index 67ddc268261188797f7c16e1b4a72469e22490c5..781b5b8fb9a445c0b271f07ce533d33db8f6a021 100644 --- a/Remoting/Application/Testing/Python/ReflectBackwardsCompatibilityTest.py +++ b/Remoting/Application/Testing/Python/ReflectBackwardsCompatibilityTest.py @@ -15,6 +15,9 @@ sphereReflection.Center = 2 assert(sphereReflection.ReflectionPlane.Normal == [0.0, 1.0, 0.0]) assert(sphereReflection.ReflectionPlane.Origin == [2.0, 2.0, 2.0]) +sphereReflection.Plane = 'Z Min' +assert(sphereReflection.PlaneMode == 'Z Min') + sphereReflection.PlaneMode = 2 assert(sphereReflection.Plane == 'Y Min') diff --git a/Wrapping/Python/paraview/_backwardscompatibilityhelper.py b/Wrapping/Python/paraview/_backwardscompatibilityhelper.py index d27b7dac1c2ff4e4050c414265568ff1ea2a7f56..6fd82909f4ddfdf6be917044f7510cb8ad5378e9 100644 --- a/Wrapping/Python/paraview/_backwardscompatibilityhelper.py +++ b/Wrapping/Python/paraview/_backwardscompatibilityhelper.py @@ -525,6 +525,13 @@ def setattr(proxy, pname, value): if proxy.SMProxy and proxy.SMProxy.GetXMLName() in ("HyperTreeGridAxisReflection", "AxisAlignedReflectionFilter"): if pname == "PlaneNormal": if compatibility_version < (5, 14): + if type(value).__name__ == 'str': + if value == 'X Axis': + value = 6 + elif value == 'Y Axis': + value = 7 + elif value == 'Z Axis': + value = 8 if value == 6: proxy.GetProperty("ReflectionPlane").GetData().Normal = [1, 0, 0] elif value == 7: @@ -545,6 +552,25 @@ def setattr(proxy, pname, value): if proxy.SMProxy and proxy.SMProxy.GetXMLName() in ("ReflectionFilter", "AxisAlignedReflectionFilter"): if pname == "Plane": if compatibility_version < (5, 14): + if type(value).__name__ == 'str': + if value == 'X Min': + value = 0 + elif value == 'Y Min': + value = 1 + elif value == 'Z Min': + value = 2 + elif value == 'X Max': + value = 3 + elif value == 'Y Max': + value = 4 + elif value == 'Z Max': + value = 5 + elif value == 'X': + value = 6 + elif value == 'Y': + value = 7 + elif value == 'Z': + value = 8 if value < 6: proxy.PlaneMode = value + 1 else: