Skip to content
Snippets Groups Projects
Commit 51c94b34 authored by Ned Coltman's avatar Ned Coltman
Browse files

[postprocessing] Add pvpython version check for line source

parent 3d6a50a8
No related branches found
No related tags found
1 merge request!2922Fix extractline data script to work with more pvpython versions
Pipeline #12032 passed
+2
......@@ -14,6 +14,7 @@ try:
SetActiveSource,
PlotOverLine,
CreateWriter,
GetParaViewVersion,
)
except ImportError as exc:
raise ImportError(
......@@ -102,8 +103,12 @@ for curFile in args["files"]:
vtkFile = XMLUnstructuredGridReader(FileName=curFile)
SetActiveSource(vtkFile)
pvPythonVersion = GetParaViewVersion()
# apply and configure PlotOverLine filter
plotOverLine = PlotOverLine(Source="Line")
if pvPythonVersion >= 5.9:
plotOverLine = PlotOverLine(Source="Line")
else:
plotOverLine = PlotOverLine(Source="High Resolution Line Source")
plotOverLine.Source.Resolution = args["resolution"]
plotOverLine.Source.Point1 = args["point1"]
plotOverLine.Source.Point2 = args["point2"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment