MEL XボタンクリックでX座標表示 X 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;
};
window -width 120 -height 50 -title "X" -rtf 1;
columnLayout -adjustableColumn true;
separator;
rowColumnLayout -numberOfColumns 2 -columnAttach 1 "right" 0 -columnWidth 1 20 -columnWidth 2 100;
button -label "X" -command "XXX" -width 20 ;
textField -width 100 -editable true AA;
setParent..;
separator;
gridLayout -numberOfColumns 1 -cellWidth 120 -cellHeight 20;
button -label "X MOVE" -command "X";
setParent..;
showWindow;