Code:
string $setKeyKeyable;
if (`window -exists $setKeyKeyable`) deleteUI -window $setKeyKeyable;
$setKeyKeyable = `window -wh 450 400 -t "Set Key Keyable"`;
rowColumnLayout -numberOfColumns 4;
string $setB,$cutB,$cutAllB,$attr;
string $attrList[] = `listAttr -k`;
if( size($attrList) > 0){
$attrList = stringArrayRemoveDuplicates($attrList);
$attrList = sort ($attrList);
for( $i=0; $i<size($attrList); $i+=1 ) {
$attr = $attrList[$i];
text -label $attr -align "center"; $setB = `button -l "set"`;
$cutB = `button -l "cut"`;
$cutAllB = `button -l "cutAll"`;
button -e -c {"setKeyframe -at "+$attr+";"} $setB;
button -e -c {"cutKey -t `currentTime -q` -at "+$attr+";"} $cutB;
button -e -c {"cutKey -at "+$attr+";"} $cutAllB;
}
} else
text -label "no keyable";
setParent ..;
showWindow $setKeyKeyable;