when I import a particle seq into Maya, the pivot in Maya is set to the world space origin. I'd prefer if the pivot was either at the emitters original pivot or at the particle clouds center of mass (final frame).
The latter, I can write for myself in MEL, but it was nice to have the first at least as an option when importing.
correctly importing pivots
Re: correctly importing pivots
Just in case you need an "Align RF particle sequence" script in Maya, but you are too lazy to code it for yourself:
Code: Select all
string $nodes[] = `ls -sl`;
vector $scaleSource;
vector $trnlSource;
vector $rotPivotSource;
vector $sclPivotSource;
int $cnt = 0;
for ($n in $nodes)
{
if (`objectType $n` == "transform")
{
// case source
if($cnt == 0)
{
$scaleSource = `getAttr ($n + ".scale")`;
$trnlSource = `getAttr ($n + ".translate")`;
$rotPivotSource = `getAttr ($n + ".rotatePivot")`;
$sclPivotSource = `getAttr ($n + ".scalePivot")`;
$cnt += 1;
continue;
}
// case target
if($cnt == 1)
{
// set pivots first
setAttr ($n + ".rotatePivot") ($rotPivotSource.x) ($rotPivotSource.y) ($rotPivotSource.z);
setAttr ($n + ".scalePivot") ($sclPivotSource.x) ($sclPivotSource.y) ($sclPivotSource.z);
setAttr ($n + ".scale") ($scaleSource.x) ($scaleSource.y) ($scaleSource.z);
setAttr ($n + ".translate") ($trnlSource.x) ($trnlSource.y) ($trnlSource.z);
print ("\n Done.");
}
else
{
print ("no more than two nodes possible!");
}
}
};
Re: correctly importing pivots
Thank you very much Florian
Hector Artal
RealFlow | Cinema4D developer
Next Limit Technologies
RealFlow | Cinema4D developer
Next Limit Technologies