Avoid properties that change the output of a filter
In ParaView, there are a few properties that can change the output type of a filter.
Some of them are handled in a such a way that the output type should be set before the first apply, eg all Programmable filters and sources.
Other can switch type on the fly, especially:
- AppendDataSet: OutputDataSetType
- GroupDataSet: OutputType
- MergeBlocks: OutputDataSetType
- Slice: CrinkleSlice/SliceType (HTG only)
- SliceWithPlane: SliceType (AMR Only)
- ExtractSelection: HyperTreeGridToUnstructuredGrid (HTG only)
This is an issue because once the output of this filter has been connected to another filter, there is no way to ensure the output type will never change and this can causes errors and even crashes.
Lets try to improve this situation with the following:
- Avoid adding new filters and new properties that change their output types depending of an input. That include going from vtkDataSet to/from vtkCompositeDataSet
- Add a warning mechanism (based on https://gitlab.kitware.com/paraview/paraview/-/blob/3130fddfdacbadbefadaea86fe60f76ed7d72eaf/Utilities/Doxygen/pages/PropertyHints.md#warnonpropertychange) so that the user know that changing this property may have unintended consequences
- Separate filters in multiples filters a depracate filters when possible
Please note PassInput type algorithm are fine, even though one can have the same behavior using the "ChangeInput" feature, this is a much more advanced feature, although a warning should be added in the "ChangeInput" dialog to inform the user would make sense.