//build the robot arm polyCube -w 1 -h 10 -d 1 -n armsection; move -r 0 4 0; polyCylinder -r 1.5 -h 1.5 -sx 20 -sy 1 -sz 1 -ax 0 0 1 -tx 1 -ch 1 -n shoulder; parent armsection shoulder; duplicate shoulder; rename shoulder1 elbow; move -r 0 9 0 elbow; parent elbow shoulder; polyCreateFacet -ch on -tx 1 -s 1 -p 0 0 0 -p 0 1 0 -p -2.008728 2.237426 0 -p -1.987394 3.538813 0 -p -1 4 0 -p 0 4 0 -p 0 5 0 -p -1 5 0 -p -3.011436 4.285511 0 -p -3 2 0 -p -1.091357 0.552023 0 -p -1 0 0 ; polyExtrudeFacet -ch 1 -kft 0 -pvx -1.5 -pvy 2.763820857 -pvz 0 -tx 0 -ty 0 -tz 0 -rx 0 -ry 0 -rz 0 -sx 1 -sy 1 -sz 1 -ran 0 -divisions 1 -twist 0 -taper 1 -off 0 -ltz 0 -ws 0 -ltx 0 -lty 0 -lrx 0 -lry 0 -lrz 0 -lsx 1 -lsy 1 -lsz 1 -ldx 1 -ldy 0 -ldz 0 -w 0 -gx 0 -gy -1 -gz 0 -att 0 -mx 0 -my 0 -mz 0 polySurface1.f[0]; setAttr "polyExtrudeFace1.localTranslate" -type double3 0 0 0.573195 ; select polySurface1; move -r 0 0 -0.25; duplicate -rr; scale -r -1 1 1; rename polySurface1 gripper1; rename polySurface2 gripper2; polyCylinder -r 1.5 -h 1.5 -sx 20 -sy 1 -sz 1 -ax 0 0 1 -tx 1 -ch 1 -n wrist_bend; move 0 -1.5 0; polyCylinder -r 2 -h 1 -sx 20 -sy 1 -sz 1 -ax 0 1 0 -tx 1 -ch 1 -n wrist_twist; move 0 -0.4 0; parent gripper1 gripper2 wrist_twist; parent wrist_twist wrist_bend ; move -r 0 20 0 wrist_bend; parent wrist_bend elbow; move 0 1.5 0 shoulder; polyCylinder -r 3 -h 1 -sx 20 -sy 1 -sz 1 -ax 0 1 0 -tx 1 -ch 1 -n base; parent shoulder base; move 0 0.5 0 base; select -cl; // create a set driven key setDrivenKeyframe -cd gripper1.rotateZ gripper2.rotateZ; setAttr "gripper1.rotateZ" 35; setAttr "gripper2.rotateZ" -35; setDrivenKeyframe -cd gripper1.rotateZ gripper2.rotateZ; // set rotation limits on gripper transformLimits -rz 0 35 -erz 1 1 gripper1; //lock off channels for manips setAttr -lock true "base.rx"; setAttr -lock true "base.rz"; setAttr -lock true "base.scale"; setAttr -lock true "shoulder.translate"; setAttr -lock true "shoulder.rx"; setAttr -lock true "shoulder.ry"; setAttr -lock true "shoulder.scale"; setAttr -lock true "elbow.translate"; setAttr -lock true "elbow.rx"; setAttr -lock true "elbow.ry"; setAttr -lock true "elbow.scale"; setAttr -lock true "wrist_twist.translate"; setAttr -lock true "wrist_twist.rx"; setAttr -lock true "wrist_twist.rz"; setAttr -lock true "wrist_twist.scale"; setAttr -lock true "wrist_bend.translate"; setAttr -lock true "wrist_bend.rx"; setAttr -lock true "wrist_bend.ry"; setAttr -lock true "wrist_bend.scale"; setAttr -lock true "gripper1.translate"; setAttr -lock true "gripper1.rx"; setAttr -lock true "gripper1.ry"; setAttr -lock true "gripper1.scale";