Rotate Object infinity MAYA Mel Script


Rotate Object infinity MAYA Mel Script, Car Wheels and others

Copy this Script and open MAYA Script Editor and paste in Mel script area then select a object or Car Wheel rigging control, After select Script >> Press Enter

// Start Script

string $sel[] = `ls -sl`;
string $obj;
for ($obj in $sel)
setKeyframe;

{
    int $frame;
 $frame = `currentTime -q`;
 currentTime ($frame) ;
 setAttr ($obj + ".rotate") 0 0 0;
setKeyframe;
   int $frame;
 $frame = `currentTime -q`;
 currentTime ($frame+2) ;
 setAttr ($obj + ".rotate") 0 0 25;
setKeyframe;
selectKey -add -k -t 0 -t 2 ($obj + ".rotate") ;
keyTangent -itt spline -ott spline;
setInfinity -poi cycleRelative;
}
 
// End Script

No comments:

Post a Comment