Graph Editor > filterUIFilterSelection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to write a mel script that will toggle between a filtered and non-filtered view of the graph editor outliner.
If you select some attributes in the graph editor (for example, Translate X) and right click on the channel, you get the menu:
show > selected Attributes
This only displays the selected attributes.
If you right click to bring up the menu and choose:
show > Show All
The rest of the attributes re-appear.
If you use History > echo all commands in the script editor, you get two separate commands to replicate the above actions:
This displays only selected attributes:
filterUIFilterSelection graphEditor1OutlineEd graphEditor1Window|TearOffPane|graphEditor1|formLayout127|paneLayout11|graphEditor1OutlineEdForm|paneLayout12|graphEditor1OutlineEd|graphEditor1OutlineEdPopup|menuItem3035|FilterUISaveFilterMenuItem;
This displays all the attributes/ unhides them all:
filterUIClearFilter graphEditor1OutlineEd;
My question is, how do I query the state of the filtered attibutes?
In pseudocode, I'd like to do this:
state = isFilteredBoolean;
if (state == nothingIsFiltered) { //filter selected attributes filterUIFilterSelection graphEditor1OutlineEd graphEditor1Window|TearOffPane|graphEditor1|formLayout127|paneLayout11|graphEditor1OutlineEdForm|paneLayout12|graphEditor1OutlineEd|graphEditor1OutlineEdPopup|menuItem3035|FilterUISaveFilterMenuItem; } else { //clear filters filterUIClearFilter graphEditor1OutlineEd; }
Thanks!