global proc makeCarPivotAnimGroup() { string $car[] = `polyCube -w 1 -h 0.7 -d 3 -sx 1 -sy 1 -sz 3 -ax 0 1 0 -cuv 4 -ch 1`; string $extrude[] = `polyExtrudeFacet -constructionHistory 1 -keepFacesTogether 1 -pvx 0 -pvy 0.349999994 -pvz 0 -divisions 1 -twist 0 -taper 1 -off 0 -thickness 0 -smoothingAngle 30 ($car[0]+".f[2]")`; // Result: polyExtrudeFace1 // setAttr ($extrude[0]+".localTranslate") -type double3 0 0 0.62778 ; string $wheels1[] = `polyCylinder -r 1 -h 2 -sx 20 -sy 1 -sz 1 -ax 0 1 0 -rcp 0 -cuv 3 -ch 1`; xform -t 0.013 -0.301 0.854 -ro 0 0 90 -s 0.449 0.695 0.449 $wheels1[0]; string $wheels2[] = `polyCylinder -r 1 -h 2 -sx 20 -sy 1 -sz 1 -ax 0 1 0 -rcp 0 -cuv 3 -ch 1`; xform -t 0.013 -0.301 -0.854 -ro 0 0 90 -s 0.449 0.695 0.449 $wheels2[0]; select -r $car[0] $wheels1[0] $wheels2[0]; string $groupName = `group`; xform -t -10 0 0 $groupName; xform -ws -piv 0 0 0 $groupName; expression -s ($groupName+".rotateY = frame*5") -o $groupName -ae 1 -uc all ; } makeCarPivotAnimGroup;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter