MEL: Maya comand batch
Command to cache particles via the shell quite cool indeed;
mayabatch -batch -file batchParts.ma -command "dynExport -path \"batchParts\" -f cache -mnf 1 -mxf 48 -oup 0 particleShape1;"
Added mel script:-
{
string $cacheParticle;
string $part[] = `ls -typ "particle" `;
for( $i in $part )
{
string $cmd = "getAttr " + $i + ".isDynamic ";
if ( `eval $cmd` )
{
$cacheParticle += $i + " ";
}
}
eval dynExport -path "batchParts" -f cache -mnf 1 -mxf 48 -oup 0 $cacheParticle;
}
commandLine when using mel script:-
mayabatch -batch -file "batchParts.ma" -script "C:/ParticleEffects/WaterFall/ssParticleBatch.mel"
mayabatch -batch -file batchParts.ma -command "dynExport -path \"batchParts\" -f cache -mnf 1 -mxf 48 -oup 0 particleShape1;"
Added mel script:-
{
string $cacheParticle;
string $part[] = `ls -typ "particle" `;
for( $i in $part )
{
string $cmd = "getAttr " + $i + ".isDynamic ";
if ( `eval $cmd` )
{
$cacheParticle += $i + " ";
}
}
eval dynExport -path "batchParts" -f cache -mnf 1 -mxf 48 -oup 0 $cacheParticle;
}
commandLine when using mel script:-
mayabatch -batch -file "batchParts.ma" -script "C:/ParticleEffects/WaterFall/ssParticleBatch.mel"


0 Comments:
Post a Comment
<< Home