MEL annotation作成ツール選択物の名前を自動入力

string $window = `window -widthHeight 10 10`;
setParent ..;
showWindow $window;
deleteUI -window $window;

global proc Ano_01()

{

string $OBJ_01;
string $OBJS_01= `ls -sl`;
for($OBJ_01 in $OBJS_01)
{
float $Tra
=`xform -q -a -ws -t $OBJ_01`;
float $XX=($Tra[0]-2);
float $YY=($Tra[1]+1);
float $ZZ=($Tra[2]);
annotate -tx $OBJ_01 -p $XX $YY $ZZ $OBJ_01;
select -tgl $OBJ_01 ;
Parent;
};

};



global proc Ano_02()

{
select `ls "annotation*"`;
doDelete;
};


global proc Ano_03()

{
select `ls "annotation*"`;
TemplateObject;
};


global proc Ano_04()
{
select `ls "annotation*"`;
UntemplateObject;
};


global proc Ano_05()
{
select `ls "annotation*"`;
HideSelectedObjects;
};


global proc Ano_06()
{
select `ls "annotation*"`;
ShowSelectedObjects;
};



window -width 300 -height 135 -title "annotation" -rtf 1;
columnLayout -adjustableColumn true;

text -label "annotation" -align "center";

button -label "CreateName" -command "Ano_01";
separator;
separator;
button -label "DeleteAll" -command "Ano_02";

separator;
separator;
checkBox -label "Temple" -offCommand "Ano_04" -onCommand "Ano_03" -align "center";
checkBox -label "Hide" -offCommand "Ano_06" -onCommand "Ano_05" -align "center";

setParent..;

showWindow;