The Extract Cells By Type
filter may be more convenient since loading a plugin isn’t needed for that. It will do dataset modification though. So a completely new grid object will be created, which could be bad for large datasets if you want either no or all cells of a block and the cells aren’t homogeneous. The Extract Cells By Type
does check for homogeneous cells though and if the cells are all of the same type the filter generates a shallow copy for output from the input, which makes the filter efficient for your use case.
After getting some more information in boolean input for Python Plugin - #2 by theodorebaltis I figured out how to properly set boolean filter inputs so I updated my plugin –
processMultiBlocks2.py (8.4 KB)
The Extract Cells By Type
is probably a better solution since it is doesn’t need to be loaded as a plugin, efficient and maintains the block hierarchy. At least I learned how to implement a ParaView Python plugin though so it was a worthwhile exercise for me