PythonProgrammableFilter/Source does not output valid vtkStructuredGrid if generated within the filter code
As far as I can tell, the PythonProgrammableFilter/ProgrammableSource, when set to output StructuredGrid, is not outputting something valid:
- The Render view does not show the grid.
- The spreadsheet view does not show the table
- Although I've seen it show the table once, but then stopped showing it once I flipped to the render view and back to the spreadsheet view).
- If the data is saved from that filter, the resulting VTK file has no information in it.
- Subsequent filters operates on no data.
However:
- The data information panel does show the bound of the resulting grid and data arrays, which is strange.
- If the ProgrammableFilter has a structured grid input, it can pass through the structured grid to the output without issues.
- The issue seems to be resolved if you turn the structured grid into an unstructured grid within the programmable filter code and then set the output of the filter to an unstructured grid.
A sample file is attached, I've tested through 5.4 - 5.5.2, which all seems to be affected. The file has a Text block explaining itself. It has three cases: (1) programmable source generating a structured grid, (2) the structured grid passing through a programmable filter, and (3) the structured grid generated within a filter and converted internally into an unstructured grid.