/formats script editor input to pass arguments to python scripting
global proc string[] particlesToMayaCurves(int $startAt, int $endAt, int $curveType)
{
string $result[2];
string $particle[] = `ls -tr "particle*"`;
//--> will only proceed working on the first particle item in the list
//--> regardless of how many are selected
$tnode = "\"" + $particle[0] + "\"";
python("import MayaParticleCache");
python("reload(MayaParticleCache)");
$cmd = python("MayaParticleCache.particlesToMayaCurves(" +
$tnode + "," +
$startAt + "," +
$endAt + "," +
$curveType + ")" );
$path = python("MayaParticleCache.writeToFile()");
$result[0] = $cmd;
$result[1] = $path;
return $result;
}
global proc string[] particlesToRmanCurves(int $startAt, int $endAt, int $isRand, int $curveType)
{
string $result[2];
string $particle[] = `ls -tr "particle*"`;
$tnode = "\"" + $particle[0] + "\"";
python("import RmanCurveWriter");
python("reload(RmanCurveWriter)");
$cmd = python("RmanCurveWriter.particlesToRmanCurves(" +
$tnode + "," +
$startAt + "," +
$endAt + "," +
$isRand + "," +
$curveType + ")" );
$path = python("RmanCurveWriter.writeToFile()");
return $path;
}