tryPrintCurveEP.mel

こんな感じでカーブオブジェクトを作成したら、選択状態でコマンドラインへ
tryPrintCurveEP 桁数
で実行。

するとスクリプトエディタの履歴に座標がプリントされます。

少数以下2桁を指定したので、こんな風に出てきます。
これをカーブオブジェクトの座標を作成するプロシージャにして呼び出し。
----------------------------------------
proc _putCurvePos(
vector $pos[] )
{
clear $pos;
$pos[0]=<< 0.00, 0.00, 1.00 >>;
$pos[1]=<< 0.60, 0.00, 0.00 >>;
$pos[2]=<< 0.30, 0.00, 0.00 >>;
$pos[3]=<< 0.30, 0.00,-1.00 >>;
$pos[4]=<< -0.30, 0.00,-1.00 >>;
$pos[5]=<< -0.30, 0.00, 0.00 >>;
$pos[6]=<< -0.60, 0.00, 0.00 >>;
$pos[7]=<< 0.00, 0.00, 1.00 >>;
}
global proc createArrow()
{
vector $pos[];
_putCurvePos( $pos );
rename `createCurveObject $pos` "arrow";
}
----------------------------------------
今まではインデントをそろえたりするのが面倒だったんですよねぇ。
ちなみに createCurveObject を参照。
0 件のコメント:
コメントを投稿