How to discover if a filter is legal within a trace?

I have a user asking how to tell if a filter, to be used in a Python trace, is legal? In other words, if the user were using the GUI illegal filters would be grayed out. Is it possible to find this information within a trace?

There seems to be some vtkSMInputProperty::IsInDomains() that is used to determine this (in pqFiltersMenuReaction). I don’t see Python wrapping for this.

Cc: @utkarsh.ayachit

There isn’t anything convenient in the Python layer, but we could add a function to check that a filter can accept an input.


HI Cory,
One thing I might add to this discussion is that if anything is selected within the Pipeline Browser is right-clicked, it automatically filters the the list of available filters to add, to the ones that are relevant to that item. I am just asking the question, but would it be possible to use that functionality within pvpython?

@cory.quammen @wascott