/* Title: toi_skeleton 1.1 Author: Christiaan van den Bosch Date: November 18 2011 Descr: */ global proc toi_skeleton() { /////////////////////////////////////////////////////////////////////////////////////////////////// // Skeleton /////////////////////////////////////////////////////////////////////////////////////////////////// group -em -n Skeleton; toi_lockhideAttr ("Skeleton tx ty tz rx ry rz sx sy sz v"); /////////////////////////////////////////////////////////////////////////////////////////////////// // Spine and head /////////////////////////////////////////////////////////////////////////////////////////////////// joint -n BO_Torso_1 -rad 2 -p 0 90 0; joint -n BO_Torso_7 -rad 2 -p 0 130 0; //head select -r Skeleton; joint -n BO_Neck -rad 1 -p 0 140 0; joint -n BO_Neck_end -rad 1 -p 0 154 4; joint -n BO_Jaw -rad 1 -p 0 153 5; joint -n BO_Tongue_1 -rad 1 -p 0 147 6; joint -n BO_Tongue_2 -rad 1 -p 0 147.5 8; joint -n BO_Tongue_3 -rad 1 -p 0 147.5 10; joint -n BO_Tongue_end -rad 1 -p 0 147 12; select -r BO_Jaw; joint -n BO_Teeth_up -rad 1 -p 0 150 9; joint -n BO_Teeth_low -rad 1 -p 0 145 9; /////////////////////////////////////////////////////////////////////////////////////////////////// // creating Eye_sphere /////////////////////////////////////////////////////////////////////////////////////////////////// // creating polySphere polySphere -n Eye -ch 1 -sx 32 -sy 16 -ax 0 0 1 -r 1; rename polySphere1 EyePolySphere; xform -a -t 3.5 160 10 Eye; parent Eye BO_Neck_end; // adding attributes addAttr -ln "Size" -at double -dv 1 -min 0.01 "Eye"; setAttr -e -k 1 "Eye.Size"; addAttr -ln "Squash" -at double -dv 1 -min 0.1 "Eye"; setAttr -e -k 1 "Eye.Squash"; // connecting attribues connectAttr -f "Eye.Size" "EyePolySphere.radius"; connectAttr -f "Eye.Squash" "Eye.sz"; // hiding obsolete attributes toi_lockhideAttr ("Eye rx ry rz sx sy v"); setAttr -l false -k false -cb false Eye.sz; //toi_hideAttr ("Eye sz"); toi_lockhideAttr ("BO_Torso_1 tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Torso_7 tx tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Neck tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Neck_end tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Jaw tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Tongue_1 tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Tongue_2 tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Tongue_3 tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Tongue_end tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Teeth_up tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Teeth_low tx rx ry rz sx sy sz"); /////////////////////////////////////////////////////////////////////////////////////////////////// // arm /////////////////////////////////////////////////////////////////////////////////////////////////// select -r Skeleton; joint -n BO_Clavicle_L -rad 2 -p 2.5 135 1.5; select -r Skeleton; joint -n BO_Shoulder_L -rad 2 -p 13 135 -5; joint -n BO_Elbow_L -rad 2 -p 37 135 -5; joint -n BO_Wrist_L -rad 1 -p 60 135 -5; joint -n BO_Wrist_end_L -rad 1 -p 65 135 -5; spaceLocator -n Elbow_L_loc; move -a 37 135 -10 Elbow_L_loc; parent -a Elbow_L_loc BO_Elbow_L; toi_lockhideAttr ("BO_Clavicle_L rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Shoulder_L rx ry sx sy sz"); toi_lockhideAttr ("BO_Elbow_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Wrist_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Wrist_end_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("Elbow_L_loc tx ty rx ry rz sx sy sz"); /////////////////////////////////////////////////////////////////////////////////////////////////// // hand /////////////////////////////////////////////////////////////////////////////////////////////////// select -r BO_Wrist_L; joint -n BO_Thumb_1_L -rad 1 -p 65 134 -1; joint -n BO_Thumb_2_L -rad 1 -p 70 134 -1; joint -n BO_Thumb_3_L -rad 1 -p 73 134 -1; joint -n BO_Thumb_end_L -rad 1 -p 76 134 -1; setAttr "BO_Thumb_1_L.jox" 90; setAttr "BO_Thumb_1_L.joy" -30; setAttr "BO_Thumb_1_L.joz" -24; select -r BO_Wrist_L; joint -n BO_Index_1_L -rad 1 -p 68 134 -1; joint -n BO_Index_2_L -rad 1 -p 73 134 -1; joint -n BO_Index_3_L -rad 1 -p 76 134 -1; joint -n BO_Index_end_L -rad 1 -p 79 134 -1; select -r BO_Wrist_L; joint -n BO_Middle_1_L -rad 1 -p 69 134 -3.5; joint -n BO_Middle_2_L -rad 1 -p 74 134 -3.5; joint -n BO_Middle_3_L -rad 1 -p 77 134 -3.5; joint -n BO_Middle_end_L -rad 1 -p 80 134 -3.5; select -r BO_Wrist_L; joint -n BO_Ring_1_L -rad 1 -p 68.5 134 -6; joint -n BO_Ring_2_L -rad 1 -p 73.5 134 -6; joint -n BO_Ring_3_L -rad 1 -p 76.5 134 -6; joint -n BO_Ring_end_L -rad 1 -p 79.5 134 -6; select -r BO_Wrist_L; joint -n BO_Pink_1_L -rad 1 -p 67.5 134 -8.5; joint -n BO_Pink_2_L -rad 1 -p 72 134 -8.5; joint -n BO_Pink_3_L -rad 1 -p 74.5 134 -8.5; joint -n BO_Pink_end_L -rad 1 -p 77 134 -8.5; select -r BO_Wrist_L; joint -n BO_Pink_Base_L -rad 1 -p 62 134 -8.5; spaceLocator -n Hand_bend_loc_L; move -a 68 136 -3.5 Hand_bend_loc_L; parent -a Hand_bend_loc_L BO_Middle_1_L; spaceLocator -n Hand_outside_loc_L; move -a 68 132 -10.5 Hand_outside_loc_L; parent -a Hand_outside_loc_L BO_Middle_1_L; spaceLocator -n Hand_inside_loc_L; move -a 68 132 1 Hand_inside_loc_L; parent -a Hand_inside_loc_L BO_Middle_1_L; toi_lockhideAttr ("BO_Thumb_1_L rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Thumb_2_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Thumb_3_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Thumb_end_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Index_1_L rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Index_2_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Index_3_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Index_end_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Middle_1_L rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Middle_2_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Middle_3_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Middle_end_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Ring_1_L rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Ring_2_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Ring_3_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Ring_end_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Pink_1_L rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Pink_2_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Pink_3_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Pink_end_L ty tz rx ry rz sx sy sz"); /////////////////////////////////////////////////////////////////////////////////////////////////// // Leg /////////////////////////////////////////////////////////////////////////////////////////////////// select -cl; joint -n BO_Hip_L -rad 2 -p 8 90 0; joint -n BO_Knee_L -rad 2 -p 8 50 -1; joint -n BO_Ankle_L -rad 2 -p 8 10 -2; select -r BO_Hip_L; joint -n BO_Hip_front_L -rad 2 -p 8 90 10; select -r BO_Hip_L; joint -n BO_Hip_side_L -rad 2 -p 18 90 0; select -r BO_Hip_L; joint -n BO_Hip_back_L -rad 2 -p 8 90 -10; spaceLocator -n Knee_L_loc; move -a 8 50 9 Knee_L_loc; spaceLocator -n KneeTwist_loc_L; move -a -92 10 -2 KneeTwist_loc_L; select -cl; joint -n BO_Ball_L -rad 2 -p 8 0 10; joint -n BO_Toe_L -rad 2 -p 8 0 15; joint -n BO_Toe_end_L -rad 2 -p 8 0 20; select -cl; spaceLocator -n Heel_loc_L; move -a 8 0 -5 Heel_loc_L; spaceLocator -n Inside_loc_L; move -a 1 0 10 Inside_loc_L; setAttr "Inside_loc_LShape.localScaleZ" 10; spaceLocator -n Outside_loc_L; move -a 15 0 10 Outside_loc_L; setAttr "Outside_loc_LShape.localScaleZ" 10; select -cl; group -em -n Foot_temp; move -a 8 0 0 Foot_temp; parent Foot_temp Skeleton; parent -a BO_Hip_L BO_Torso_1; parent -a Knee_L_loc BO_Knee_L; parent -a KneeTwist_loc_L BO_Ankle_L; parent -a Inside_loc_L BO_Ball_L; parent -a Outside_loc_L BO_Ball_L; parent -a Heel_loc_L BO_Ball_L Foot_temp; toi_lockhideAttr ("BO_Hip_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Hip_front_L tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Hip_side_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Hip_back_L tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Knee_L tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Ankle_L tx rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Ball_L tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Toe_L tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("BO_Toe_end_L tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("Knee_L_loc tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("KneeTwist_loc_L ty tz rx ry rz sx sy sz"); toi_lockhideAttr ("Heel_loc_L tx ty rx ry rz sx sy sz"); toi_lockhideAttr ("Inside_loc_L ty rx rz sx sy sz"); toi_lockhideAttr ("Outside_loc_L ty tz rx rz sx sy sz"); connectAttr -f BO_Hip_L.tx Foot_temp.tx; } global proc toi_lockhideAttr(string $in) { string $attr[] = stringToStringArray($in, " "); int $i = 1; for ($i = 1; $i < size($attr); $i++) { setAttr -l true -k false -cb false ($attr[0] + "." + $attr[$i]); } }