MEL ZボタンクリックでZ座標表示 Z MOVEボタンクリックで入力座標移動

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;
};

window -width 120 -height 50 -title "Z" -rtf 1;

columnLayout -adjustableColumn true;

separator;

rowColumnLayout -numberOfColumns 2 -columnAttach 1 "right" 0 -columnWidth 1 20 -columnWidth 2 100;
button -label "Z" -command "ZZZ" -width 20 ;
textField -width 100 -editable true CC;
setParent..;
separator;

gridLayout -numberOfColumns 1 -cellWidth 120 -cellHeight 20;
button -label "Z MOVE" -command "Z";
setParent..;

showWindow;