// Graph Editor Filter // October 3, 2002 // Jeremy Cantor // // Allows the user to filter which curves are visible in the graph editor. // Works with multiple selections as well as custom attributes. // Saves you the trouble of scrolling through the object list and ctrl-selecting // all the x-translate curves (for example). // Creates a pop-up window with a list of keyable attributes of all selected objects. // Simply select the channel (or channels) and hit the "filter" button. // Has "replace" and "append" modes. And a Graph-Editor toggle button. // // Should be self-explanatory. // If not...direct questions/comments/complaints to // jeremycantor@attbi.com // global proc getAllAttrs() { string $whatPicked[] = `ls -sl`; if (size($whatPicked) > 0) { //list all keyable attributes string $listFull[]; if (`checkBox -q -v ifLocked` == 1) $listFull = `listAttr -k`; else $listFull = `listAttr -u -k`; if (size($listFull) == 0) {textScrollList -e -ra attrList; return;} //prune list string $listPruned[]; int $y = 0; for ($x=0; $x<(size($listFull)); $x++) { string $A = $listFull[$x]; //check to see if current item is already in pruned list string $alreadyThere = "no"; for ($z=0; $z<(size($listPruned)); $z++) if ($A == $listPruned[$z]) $alreadyThere = "yes"; //if not already there, then add to pruned list if ($alreadyThere == "no" ) {$listPruned[$y] = $A; $y++;} } //clear list textScrollList -e -ra attrList; //update list size textScrollList -e -nr (size($listPruned)) attrList; //make new list for ($x=0; $x