MEL XYZボタンで選択頂点座標表示 各MOVEボタン数値入力移動

global proc X()
{

float $aa = `textField -query -text AA`;
move -a -x $aa ;
};
global proc XXX()
{
float $val;

string $qq = `ls -sl`;
string $pos = `filterExpand -sm 31 $qq`;
int $i = 0;
for($p in $pos)
{
$pv = `pointPosition $p`;
$val[$i] = $pv[0];
}
textField -e -tx ($val[0]) AA;
};


global proc Y()
{

float $bb = `textField -query -text BB`;
move -a -y $bb ;
};
global proc YYY()
{
float $val;

string $qq = `ls -sl`;
string $pos
= `filterExpand -sm 31 $qq`;
int $i = 0;
for($p in $pos)
{
$pv = `pointPosition $p`;
$val[$i] = $pv[1];
}
textField -e -tx ($val[0]) BB;
};


global proc Z()
{

float $cc = `textField -query -text CC`;
move -a -z $cc ;
};
global proc ZZZ()
{
float $val;

string $qq = `ls -sl`;
string $pos[] = `filterExpand -sm 31 $qq`;
int $i = 0;
for($p in $pos)
{
$pv = `pointPosition $p`;
$val[$i] = $pv[2];
}
textField -e -tx ($val[0]) CC;
};

global proc ChannelInfo() {
if ((`window -ex ChannelInfo`) == true) deleteUI ChannelInfo;

window -height 30 -title "XYZ" -rtf 1 ChannelInfo;
columnLayout -columnWidth 240 -width 240;
rowLayout -columnWidth1 240 -height 28 -numberOfColumns 3 -width 240;
button -label " XYZ" -command "XXX;YYY;ZZZ" -width 240;
setParent ..;
rowLayout -columnWidth3 80 80 80 -height 28 -numberOfColumns 3 -width 240;
textField -width 80 -editable true AA;
textField -width 80 -editable true BB;
textField -width 80 -editable true CC;
setParent ..;
rowLayout -columnWidth3 80 80 80 -height 28 -numberOfColumns 3 -width 240;
button -label "X MOVE" -command "X" -width 80;
button -label "Y MOVE" -command "Y" -width 80;
button -label "Z MOVE" -command "Z" -width 80;
setParent ..;

showWindow ChannelInfo;

};

ChannelInfo;