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

**URL:** https://discourse.paraview.org/t/how-to-discover-if-a-filter-is-legal-within-a-trace/10267
**Category:** ParaView Support
**Created:** [September 7, 2022, 6:58pm UTC](https://discourse.paraview.org/t/how-to-discover-if-a-filter-is-legal-within-a-trace/10267 "2022-09-07T18:58:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [September 7, 2022, 6:58pm UTC](https://discourse.paraview.org/t/how-to-discover-if-a-filter-is-legal-within-a-trace/10267/1 "2022-09-07T18:58:02Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [September 7, 2022, 9:32pm UTC](https://discourse.paraview.org/t/how-to-discover-if-a-filter-is-legal-within-a-trace/10267/2 "2022-09-07T21:32:01Z")

</div>

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

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [September 8, 2022, 1:40pm UTC](https://discourse.paraview.org/t/how-to-discover-if-a-filter-is-legal-within-a-trace/10267/3 "2022-09-08T13:40:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![phismith](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/a9adbd/32.png) [@phismith](https://discourse.paraview.org/u/phismith)
#### Post date: [September 15, 2022, 1:19pm UTC](https://discourse.paraview.org/t/how-to-discover-if-a-filter-is-legal-within-a-trace/10267/4 "2022-09-15T13:19:03Z")

</div>

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
