1、创建一条曲线
2、确定曲线选中
3、点击shelf
脚本如下:
string $selection_list[] = `ls -sl`;
string $curveSelected = $selection_list[0];
float $startOffset = 0.1;
float $speed = (1.0/24.0);
offsetCurve -d $startOffset -n ($curveSelected + "guide");
float $startPoint[] = `pointOnCurve -pr 0 -p $curveSelected`;
float $startTangent[] = `pointOnCurve -pr 0 -nt $curveSelected`;
float $startGuide[] = `pointOnCurve -pr 0 -p ($curveSelected + "guide")`;
float $startNormal[];
$startNormal[0] = $startGuide[0] =$startPoint[0];
$startNormal[1] = $startGuide[1] =$startPoint[1];
$startNormal[2] = $startGuide[2] =$startPoint[2];
emitter -pos $startGuide[0] $startGuide[1] $startGuide[2] -dx $startTangent[0] -dy $startTangent[1]
-dz $startTangent[2] -n ($curveSelected + "