fixed missing file extension when adding in-place

This commit is contained in:
Philip Eisenlohr 2016-03-15 14:52:10 -04:00
parent 0e84bfd2ee
commit 6197e839c9
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ for name in filenames:
writer = vtk.vtkXMLRectilinearGridWriter()
writer.SetDataModeToBinary()
writer.SetCompressorTypeToZLib()
writer.SetFileName(os.path.splitext(options.vtk)[0]+('' if options.inplace else '_added.vtr'))
writer.SetFileName(os.path.splitext(options.vtk)[0]+('.vtr' if options.inplace else '_added.vtr'))
if vtk.VTK_MAJOR_VERSION <= 5: writer.SetInput(rGrid)
else: writer.SetInputData(rGrid)
writer.Write()