Graph Editor > filterUIFilterSelection

Graph Editor > filterUIFilterSelection

Anonymous
Not applicable
568 Views
0 Replies
Message 1 of 1

Graph Editor > filterUIFilterSelection

Anonymous
Not applicable

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!

0 Likes
569 Views
0 Replies
Replies (0)