/*=================================================================== this tool will build an export skeleton to be baked for unity from any character rig created with ADVANCED SKELETON 4 -by David Travaglione, school of visual arts 2015 ===================================================================*/ // start with building an interface to hold buttons for easy use!! if (`window -exists davesWindow`) deleteUI davesWindow; string $davesWindow = `window -title "AS4 2 Mecanim" -widthHeight 450 600 davesWindow`; if (`windowPref -exists davesWindow`) windowPref -remove davesWindow; string $davesWindow; /*------------------------------- Gui --------------------------------------*/ columnLayout ; separator -w 50 -style "in"; string $myField = `textFieldButtonGrp -label "Name:" -text "name_here" -buttonLabel "Enter Input" -bc "$currentInput = `textFieldGrp -q -text $myField`;print($currentInput);"`; separator -w 50 -style "in"; button -label "Build Unity Skeleton over AS4" -bgc 0.2 0.2 0.5 -c "createExportRig()"; text -label " "; separator -w 50 -style "in"; text -label " "; button -label "Select Bind Joints" -bgc 0.2 0.2 0.5 -c "bndJNTS()"; text -label " "; separator -w 50 -style "in"; text -label " "; button -label "Select All JNTS" -bgc 0.2 0.2 0.5 -c "selectAllJNTS()"; text -label " "; separator -w 50 -style "in"; text -label " "; text -label " Enter Animation frame number range to bake "; rowColumnLayout ;// -numberOfColumns 2 // -columnWidth 1 90 // -columnWidth 2 90; string $frameLow = `textFieldButtonGrp -label "From:" -text "1.00" -buttonLabel "Enter Input" -bc "$currentInputFrom = `textFieldGrp -q -text $frameLow`;print($currentInputFrom);"`; string $frameHigh = `textFieldButtonGrp -label "To:" -text "20.0" -buttonLabel "Enter Input" -bc "$currentInputTo = `textFieldGrp -q -text $frameHigh`;print($currentInputTo);"`; setParent..; columnLayout; button -label "Bake Animation 2 export Skel" -bgc 0.2 0.2 0.5 -c "bakeAllJNTS()"; text -label " "; separator -w 50 -style "in"; text -label " "; button -label "Remove AS4 driver rig" -bgc 0.2 0.2 0.5 -c "removeDriverRig()"; text -label " "; separator -w 50 -style "in"; text -label " "; // setParent..; button -label "Close" -command ("deleteUI -window " + $davesWindow); setParent ..; showWindow $davesWindow; /*============================= store procs here ======================*/ proc bndJNTS() { select -cl ; select -r hip_expJNT ; select -add spine_01_expJNT ; select -add spine_02_expJNT ; select -add neck_01_expJNT ; select -add neck_02_expJNT ; select -add neck_03_expJNT ; select -add neck_04_expJNT ; select -add clav_L_expJNT ; select -add shldr_L_expJNT ; select -add shldr_twist01_L_expJNT ; select -add shldr_twist02_L_expJNT ; select -add elbow_L_expJNT ; select -add elbow_twist_01_L_expJNT ; select -add elbow_twist_02_L_expJNT ; select -add wrst_L_expJNT ; select -add index_01_L_expJNT ; select -add index_02_L_expJNT ; select -add index_03_L_expJNT ; select -add middle_01_L_expJNT ; select -add middle_02_L_expJNT ; select -add middle_03_L_expJNT ; select -add ring_01_L_expJNT ; select -add ring_02_L_expJNT ; select -add ring_03_L_expJNT ; select -add pinky_01_L_expJNT ; select -add pinky_02_L_expJNT ; select -add pinky_03_L_expJNT ; select -add thumb_01_L_expJNT ; select -add thumb_02_L_expJNT ; select -add thumb_03_L_expJNT ; select -add clav_R_expJNT ; select -add shldr_R_expJNT ; select -add shldr_01_twist_R_expJNT ; select -add shldr_02_twist_R_expJNT ; select -add elbow_R_expJNT ; select -add elbow_01_twist_R_expJNT ; select -add elbow_02_twist_R_expJNT ; select -add wrst_R_expJNT ; select -add index_01_R_expJNT ; select -add index_02_R_expJNT ; select -add index_03_R_expJNT ; select -add middle_01_R_expJNT ; select -add middle_02_R_expJNT ; select -add middle_03_R_expJNT ; select -add ring_01_R_expJNT ; select -add ring_02_R_expJNT ; select -add ring_03_R_expJNT ; select -add pinky_01_R_expJNT ; select -add pinky_02_R_expJNT ; select -add pinky_03_R_expJNT ; select -add thumb01_R_expJNT ; select -add thumb02_R_expJNT ; select -add thumb03_R_expJNT ; select -add Hip_R_expJNT ; select -add Hip_twist_01_R_expJNT ; select -add Hip_twist_02_R_expJNT ; select -add Knee_R_expJNT ; select -add Ankle_R_expJNT ; select -add Toes_R_expJNT ; select -add Hip_L_expJNT ; select -add Hip_twist_01_L_expJNT ; select -add Hip_twist_02_L_expJNT ; select -add Knee_L_expJNT ; select -add ankle_L_expJNT ; select -add ballfoot_L_expJNT ; } proc selectAllJNTS() { string $selected[] = `ls -type joint`; select -r $selected; } proc bakeAllJNTS() { global string $currentInputFrom; global string $currentInputTo; bakeResults -simulation true -t ($currentInputFrom+":"+$currentInputTo) -sampleBy 1 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake false -removeBakedAttributeFromLayer false -removeBakedAnimFromLayer false -bakeOnOverrideLayer false -minimizeRotation true -at "tx" -at "ty" -at "tz" -at "rx" -at "ry" -at "rz" wrst_R_expJNT Ankle_L Ankle_R Ankle_R_expJNT Chest_M ElbowPart1_L ElbowPart1_R ElbowPart2_L ElbowPart2_R Elbow_L Elbow_R FKOffsetAnkle_L FKOffsetAnkle_R FKOffsetChest_M FKOffsetElbow_L FKOffsetElbow_R FKOffsetHead_M FKOffsetHip_L FKOffsetHip_R FKOffsetIndexFinger1_L FKOffsetIndexFinger1_R FKOffsetIndexFinger2_L FKOffsetIndexFinger2_R FKOffsetIndexFinger3_L FKOffsetIndexFinger3_R FKOffsetKnee_L FKOffsetKnee_R FKOffsetMiddleFinger1_L FKOffsetMiddleFinger1_R FKOffsetMiddleFinger2_L FKOffsetMiddleFinger2_R FKOffsetMiddleFinger3_L FKOffsetMiddleFinger3_R FKOffsetNeck_M FKOffsetPinkyFinger1_L FKOffsetPinkyFinger1_R FKOffsetPinkyFinger2_L FKOffsetPinkyFinger2_R FKOffsetPinkyFinger3_L FKOffsetPinkyFinger3_R FKOffsetRingFinger1_L FKOffsetRingFinger1_R FKOffsetRingFinger2_L FKOffsetRingFinger2_R FKOffsetRingFinger3_L FKOffsetRingFinger3_R FKOffsetRoot_M FKOffsetScapula_L FKOffsetScapula_R FKOffsetShoulder_L FKOffsetShoulder_R FKOffsetSpine1_M FKOffsetThumbFinger1_L FKOffsetThumbFinger1_R FKOffsetThumbFinger2_L FKOffsetThumbFinger2_R FKOffsetThumbFinger3_L FKOffsetThumbFinger3_R FKOffsetToes_L FKOffsetToes_R FKOffsetWrist_L FKOffsetWrist_R FKXAnkle_L FKXAnkle_R FKXChest_M FKXElbow_L FKXElbow_R FKXHead_M FKXHip_L FKXHip_R FKXIndexFinger1_L FKXIndexFinger1_R FKXIndexFinger2_L FKXIndexFinger2_R FKXIndexFinger3_L FKXIndexFinger3_R FKXKnee_L FKXKnee_R FKXMiddleFinger1_L FKXMiddleFinger1_R FKXMiddleFinger2_L FKXMiddleFinger2_R FKXMiddleFinger3_L FKXMiddleFinger3_R FKXNeck_M FKXPinkyFinger1_L FKXPinkyFinger1_R FKXPinkyFinger2_L FKXPinkyFinger2_R FKXPinkyFinger3_L FKXPinkyFinger3_R FKXRingFinger1_L FKXRingFinger1_R FKXRingFinger2_L FKXRingFinger2_R FKXRingFinger3_L FKXRingFinger3_R FKXRoot_M FKXScapula_L FKXScapula_R FKXShoulder_L FKXShoulder_R FKXSpine1_M FKXThumbFinger1_L FKXThumbFinger1_R FKXThumbFinger2_L FKXThumbFinger2_R FKXThumbFinger3_L FKXThumbFinger3_R FKXToes_L FKXToes_R FKXWrist_L FKXWrist_R HeadEnd_M Head_M HipPart1_L HipPart1_R HipPart2_L HipPart2_R Hip_L Hip_L_expJNT Hip_R Hip_R_expJNT Hip_twist_01_L_expJNT Hip_twist_01_R_expJNT Hip_twist_02_L_expJNT Hip_twist_02_R_expJNT IKSpChest_M IKSpRoot_M IKSpSpine1_M IKXAnkle_L IKXAnkle_R IKXChest_M IKXElbow_L IKXElbow_R IKXHip_L IKXHip_R IKXKnee_L IKXKnee_R IKXRoot_M IKXShoulder_L IKXShoulder_R IKXSpine1_M IKXToesEnd_L IKXToesEnd_R IKXToes_L IKXToes_R IKXWrist_L IKXWrist_R IKfake0Spine_M IKfake1Spine_M IKfake2Spine_M IKfake3Spine_M IndexFinger1_L IndexFinger1_R IndexFinger2_L IndexFinger2_R IndexFinger3End_L IndexFinger3End_R IndexFinger3_L IndexFinger3_R Knee_L Knee_L_expJNT Knee_R Knee_R_expJNT MiddleFinger1_L MiddleFinger1_R MiddleFinger2_L MiddleFinger2_R MiddleFinger3End_L MiddleFinger3End_R MiddleFinger3_L MiddleFinger3_R NeckPart1_M NeckPart2_M Neck_M PinkyFinger1_L PinkyFinger1_R PinkyFinger2_L PinkyFinger2_R PinkyFinger3End_L PinkyFinger3End_R PinkyFinger3_L PinkyFinger3_R RingFinger1_L RingFinger1_R RingFinger2_L RingFinger2_R RingFinger3End_L RingFinger3End_R RingFinger3_L RingFinger3_R Root_M Scapula_L Scapula_R ShoulderPart1_L ShoulderPart1_R ShoulderPart2_L ShoulderPart2_R Shoulder_L Shoulder_R Spine1_M ThumbFinger1_L ThumbFinger1_R ThumbFinger2_L ThumbFinger2_R ThumbFinger3End_L ThumbFinger3End_R ThumbFinger3_L ThumbFinger3_R ToesEnd_L ToesEnd_R ToesEnd_R_expJNT Toes_L Toes_R Toes_R_expJNT TwistBalancerChest_M TwistBalancerElbow_L TwistBalancerElbow_R TwistBalancerHead_M TwistBalancerHip_L TwistBalancerHip_R TwistBalancerKnee_L TwistBalancerKnee_R TwistBalancerNeck_M TwistBalancerShoulder_L TwistBalancerShoulder_R TwistBalancerWrist_L TwistBalancerWrist_R UnTwistChest_M UnTwistElbow_L UnTwistElbow_R UnTwistEndChest_M UnTwistEndElbow_L UnTwistEndElbow_R UnTwistEndHead_M UnTwistEndHip_L UnTwistEndHip_R UnTwistEndKnee_L UnTwistEndKnee_R UnTwistEndNeck_M UnTwistEndShoulder_L UnTwistEndShoulder_R UnTwistEndWrist_L UnTwistEndWrist_R UnTwistHead_M UnTwistHip_L UnTwistHip_R UnTwistKnee_L UnTwistKnee_R UnTwistNeck_M UnTwistShoulder_L UnTwistShoulder_R UnTwistWrist_L UnTwistWrist_R Wrist_L Wrist_R ankle_L_expJNT ballfoot_L_expJNT clav_L_expJNT clav_R_expJNT elbow_01_twist_R_expJNT elbow_02_twist_R_expJNT elbow_L_expJNT elbow_R_expJNT elbow_twist_01_L_expJNT elbow_twist_02_L_expJNT head_tip_expJNT hip_expJNT index_01_L_expJNT index_01_R_expJNT index_02_L_expJNT index_02_R_expJNT index_03_L_expJNT index_03_R_expJNT index_04_tip_L_expJNT index_04_tip_R_expJNT middle_01_L_expJNT middle_01_R_expJNT middle_02_L_expJNT middle_02_R_expJNT middle_03_L_expJNT middle_03_R_expJNT middle_04_L_expJNT middle_04_tip_R_expJNT neck_01_expJNT neck_02_expJNT neck_03_expJNT neck_04_expJNT pinky_01_L_expJNT pinky_01_R_expJNT pinky_02_L_expJNT pinky_02_R_expJNT pinky_03_L_expJNT pinky_03_R_expJNT pinky_04_L_tip_expJNT pinky_04_tip_R_expJNT ring_01_L_expJNT ring_01_R_expJNT ring_02_L_expJNT ring_02_R_expJNT ring_03_L_expJNT ring_03_R_expJNT ring_04_L_tip_expJNT ring_04_tip_R_expJNT root_expJNT shldr_01_twist_R_expJNT shldr_02_twist_R_expJNT shldr_L_expJNT shldr_R_expJNT shldr_twist01_L_expJNT shldr_twist02_L_expJNT spine_01_expJNT spine_02_expJNT thumb01_R_expJNT thumb02_R_expJNT thumb03_R_expJNT thumb04_tip_R_expJNT thumb_01_L_expJNT thumb_02_L_expJNT thumb_03_L_expJNT thumb_04_L_tip_expJNT toe_L_tip_expJNT wrst_L_expJNT; //bakeResults -simulation true -t ("\""+$currentInputFrom+":"+$currentInputTo+"\"") -sampleBy 1 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake false -removeBakedAttributeFromLayer false -removeBakedAnimFromLayer false -bakeOnOverrideLayer false -minimizeRotation true -at "tx" -at "ty" -at "tz" -at "rx" -at "ry" -at "rz" wrst_R_expJNT Ankle_L Ankle_R Ankle_R_expJNT Chest_M ElbowPart1_L ElbowPart1_R ElbowPart2_L ElbowPart2_R Elbow_L Elbow_R FKOffsetAnkle_L FKOffsetAnkle_R FKOffsetChest_M FKOffsetElbow_L FKOffsetElbow_R FKOffsetHead_M FKOffsetHip_L FKOffsetHip_R FKOffsetIndexFinger1_L FKOffsetIndexFinger1_R FKOffsetIndexFinger2_L FKOffsetIndexFinger2_R FKOffsetIndexFinger3_L FKOffsetIndexFinger3_R FKOffsetKnee_L FKOffsetKnee_R FKOffsetMiddleFinger1_L FKOffsetMiddleFinger1_R FKOffsetMiddleFinger2_L FKOffsetMiddleFinger2_R FKOffsetMiddleFinger3_L FKOffsetMiddleFinger3_R FKOffsetNeck_M FKOffsetPinkyFinger1_L FKOffsetPinkyFinger1_R FKOffsetPinkyFinger2_L FKOffsetPinkyFinger2_R FKOffsetPinkyFinger3_L FKOffsetPinkyFinger3_R FKOffsetRingFinger1_L FKOffsetRingFinger1_R FKOffsetRingFinger2_L FKOffsetRingFinger2_R FKOffsetRingFinger3_L FKOffsetRingFinger3_R FKOffsetRoot_M FKOffsetScapula_L FKOffsetScapula_R FKOffsetShoulder_L FKOffsetShoulder_R FKOffsetSpine1_M FKOffsetThumbFinger1_L FKOffsetThumbFinger1_R FKOffsetThumbFinger2_L FKOffsetThumbFinger2_R FKOffsetThumbFinger3_L FKOffsetThumbFinger3_R FKOffsetToes_L FKOffsetToes_R FKOffsetWrist_L FKOffsetWrist_R FKXAnkle_L FKXAnkle_R FKXChest_M FKXElbow_L FKXElbow_R FKXHead_M FKXHip_L FKXHip_R FKXIndexFinger1_L FKXIndexFinger1_R FKXIndexFinger2_L FKXIndexFinger2_R FKXIndexFinger3_L FKXIndexFinger3_R FKXKnee_L FKXKnee_R FKXMiddleFinger1_L FKXMiddleFinger1_R FKXMiddleFinger2_L FKXMiddleFinger2_R FKXMiddleFinger3_L FKXMiddleFinger3_R FKXNeck_M FKXPinkyFinger1_L FKXPinkyFinger1_R FKXPinkyFinger2_L FKXPinkyFinger2_R FKXPinkyFinger3_L FKXPinkyFinger3_R FKXRingFinger1_L FKXRingFinger1_R FKXRingFinger2_L FKXRingFinger2_R FKXRingFinger3_L FKXRingFinger3_R FKXRoot_M FKXScapula_L FKXScapula_R FKXShoulder_L FKXShoulder_R FKXSpine1_M FKXThumbFinger1_L FKXThumbFinger1_R FKXThumbFinger2_L FKXThumbFinger2_R FKXThumbFinger3_L FKXThumbFinger3_R FKXToes_L FKXToes_R FKXWrist_L FKXWrist_R HeadEnd_M Head_M HipPart1_L HipPart1_R HipPart2_L HipPart2_R Hip_L Hip_L_expJNT Hip_R Hip_R_expJNT Hip_twist_01_L_expJNT Hip_twist_01_R_expJNT Hip_twist_02_L_expJNT Hip_twist_02_R_expJNT IKSpChest_M IKSpRoot_M IKSpSpine1_M IKXAnkle_L IKXAnkle_R IKXChest_M IKXElbow_L IKXElbow_R IKXHip_L IKXHip_R IKXKnee_L IKXKnee_R IKXRoot_M IKXShoulder_L IKXShoulder_R IKXSpine1_M IKXToesEnd_L IKXToesEnd_R IKXToes_L IKXToes_R IKXWrist_L IKXWrist_R IKfake0Spine_M IKfake1Spine_M IKfake2Spine_M IKfake3Spine_M IndexFinger1_L IndexFinger1_R IndexFinger2_L IndexFinger2_R IndexFinger3End_L IndexFinger3End_R IndexFinger3_L IndexFinger3_R Knee_L Knee_L_expJNT Knee_R Knee_R_expJNT MiddleFinger1_L MiddleFinger1_R MiddleFinger2_L MiddleFinger2_R MiddleFinger3End_L MiddleFinger3End_R MiddleFinger3_L MiddleFinger3_R NeckPart1_M NeckPart2_M Neck_M PinkyFinger1_L PinkyFinger1_R PinkyFinger2_L PinkyFinger2_R PinkyFinger3End_L PinkyFinger3End_R PinkyFinger3_L PinkyFinger3_R RingFinger1_L RingFinger1_R RingFinger2_L RingFinger2_R RingFinger3End_L RingFinger3End_R RingFinger3_L RingFinger3_R Root_M Scapula_L Scapula_R ShoulderPart1_L ShoulderPart1_R ShoulderPart2_L ShoulderPart2_R Shoulder_L Shoulder_R Spine1_M ThumbFinger1_L ThumbFinger1_R ThumbFinger2_L ThumbFinger2_R ThumbFinger3End_L ThumbFinger3End_R ThumbFinger3_L ThumbFinger3_R ToesEnd_L ToesEnd_R ToesEnd_R_expJNT Toes_L Toes_R Toes_R_expJNT TwistBalancerChest_M TwistBalancerElbow_L TwistBalancerElbow_R TwistBalancerHead_M TwistBalancerHip_L TwistBalancerHip_R TwistBalancerKnee_L TwistBalancerKnee_R TwistBalancerNeck_M TwistBalancerShoulder_L TwistBalancerShoulder_R TwistBalancerWrist_L TwistBalancerWrist_R UnTwistChest_M UnTwistElbow_L UnTwistElbow_R UnTwistEndChest_M UnTwistEndElbow_L UnTwistEndElbow_R UnTwistEndHead_M UnTwistEndHip_L UnTwistEndHip_R UnTwistEndKnee_L UnTwistEndKnee_R UnTwistEndNeck_M UnTwistEndShoulder_L UnTwistEndShoulder_R UnTwistEndWrist_L UnTwistEndWrist_R UnTwistHead_M UnTwistHip_L UnTwistHip_R UnTwistKnee_L UnTwistKnee_R UnTwistNeck_M UnTwistShoulder_L UnTwistShoulder_R UnTwistWrist_L UnTwistWrist_R Wrist_L Wrist_R ankle_L_expJNT ballfoot_L_expJNT clav_L_expJNT clav_R_expJNT elbow_01_twist_R_expJNT elbow_02_twist_R_expJNT elbow_L_expJNT elbow_R_expJNT elbow_twist_01_L_expJNT elbow_twist_02_L_expJNT head_tip_expJNT hip_expJNT index_01_L_expJNT index_01_R_expJNT index_02_L_expJNT index_02_R_expJNT index_03_L_expJNT index_03_R_expJNT index_04_tip_L_expJNT index_04_tip_R_expJNT middle_01_L_expJNT middle_01_R_expJNT middle_02_L_expJNT middle_02_R_expJNT middle_03_L_expJNT middle_03_R_expJNT middle_04_L_expJNT middle_04_tip_R_expJNT neck_01_expJNT neck_02_expJNT neck_03_expJNT neck_04_expJNT pinky_01_L_expJNT pinky_01_R_expJNT pinky_02_L_expJNT pinky_02_R_expJNT pinky_03_L_expJNT pinky_03_R_expJNT pinky_04_L_tip_expJNT pinky_04_tip_R_expJNT ring_01_L_expJNT ring_01_R_expJNT ring_02_L_expJNT ring_02_R_expJNT ring_03_L_expJNT ring_03_R_expJNT ring_04_L_tip_expJNT ring_04_tip_R_expJNT root_expJNT shldr_01_twist_R_expJNT shldr_02_twist_R_expJNT shldr_L_expJNT shldr_R_expJNT shldr_twist01_L_expJNT shldr_twist02_L_expJNT spine_01_expJNT spine_02_expJNT thumb01_R_expJNT thumb02_R_expJNT thumb03_R_expJNT thumb04_tip_R_expJNT thumb_01_L_expJNT thumb_02_L_expJNT thumb_03_L_expJNT thumb_04_L_tip_expJNT toe_L_tip_expJNT wrst_L_expJNT; //bakeResults -simulation true -t "1:20" -sampleBy 1 -disableImplicitControl true -preserveOutsideKeys true -sparseAnimCurveBake false -removeBakedAttributeFromLayer false -removeBakedAnimFromLayer false -bakeOnOverrideLayer false -minimizeRotation true -at "tx" -at "ty" -at "tz" -at "rx" -at "ry" -at "rz" wrst_R_expJNT Ankle_L Ankle_R Ankle_R_expJNT Chest_M ElbowPart1_L ElbowPart1_R ElbowPart2_L ElbowPart2_R Elbow_L Elbow_R FKOffsetAnkle_L FKOffsetAnkle_R FKOffsetChest_M FKOffsetElbow_L FKOffsetElbow_R FKOffsetHead_M FKOffsetHip_L FKOffsetHip_R FKOffsetIndexFinger1_L FKOffsetIndexFinger1_R FKOffsetIndexFinger2_L FKOffsetIndexFinger2_R FKOffsetIndexFinger3_L FKOffsetIndexFinger3_R FKOffsetKnee_L FKOffsetKnee_R FKOffsetMiddleFinger1_L FKOffsetMiddleFinger1_R FKOffsetMiddleFinger2_L FKOffsetMiddleFinger2_R FKOffsetMiddleFinger3_L FKOffsetMiddleFinger3_R FKOffsetNeck_M FKOffsetPinkyFinger1_L FKOffsetPinkyFinger1_R FKOffsetPinkyFinger2_L FKOffsetPinkyFinger2_R FKOffsetPinkyFinger3_L FKOffsetPinkyFinger3_R FKOffsetRingFinger1_L FKOffsetRingFinger1_R FKOffsetRingFinger2_L FKOffsetRingFinger2_R FKOffsetRingFinger3_L FKOffsetRingFinger3_R FKOffsetRoot_M FKOffsetScapula_L FKOffsetScapula_R FKOffsetShoulder_L FKOffsetShoulder_R FKOffsetSpine1_M FKOffsetThumbFinger1_L FKOffsetThumbFinger1_R FKOffsetThumbFinger2_L FKOffsetThumbFinger2_R FKOffsetThumbFinger3_L FKOffsetThumbFinger3_R FKOffsetToes_L FKOffsetToes_R FKOffsetWrist_L FKOffsetWrist_R FKXAnkle_L FKXAnkle_R FKXChest_M FKXElbow_L FKXElbow_R FKXHead_M FKXHip_L FKXHip_R FKXIndexFinger1_L FKXIndexFinger1_R FKXIndexFinger2_L FKXIndexFinger2_R FKXIndexFinger3_L FKXIndexFinger3_R FKXKnee_L FKXKnee_R FKXMiddleFinger1_L FKXMiddleFinger1_R FKXMiddleFinger2_L FKXMiddleFinger2_R FKXMiddleFinger3_L FKXMiddleFinger3_R FKXNeck_M FKXPinkyFinger1_L FKXPinkyFinger1_R FKXPinkyFinger2_L FKXPinkyFinger2_R FKXPinkyFinger3_L FKXPinkyFinger3_R FKXRingFinger1_L FKXRingFinger1_R FKXRingFinger2_L FKXRingFinger2_R FKXRingFinger3_L FKXRingFinger3_R FKXRoot_M FKXScapula_L FKXScapula_R FKXShoulder_L FKXShoulder_R FKXSpine1_M FKXThumbFinger1_L FKXThumbFinger1_R FKXThumbFinger2_L FKXThumbFinger2_R FKXThumbFinger3_L FKXThumbFinger3_R FKXToes_L FKXToes_R FKXWrist_L FKXWrist_R HeadEnd_M Head_M HipPart1_L HipPart1_R HipPart2_L HipPart2_R Hip_L Hip_L_expJNT Hip_R Hip_R_expJNT Hip_twist_01_L_expJNT Hip_twist_01_R_expJNT Hip_twist_02_L_expJNT Hip_twist_02_R_expJNT IKSpChest_M IKSpRoot_M IKSpSpine1_M IKXAnkle_L IKXAnkle_R IKXChest_M IKXElbow_L IKXElbow_R IKXHip_L IKXHip_R IKXKnee_L IKXKnee_R IKXRoot_M IKXShoulder_L IKXShoulder_R IKXSpine1_M IKXToesEnd_L IKXToesEnd_R IKXToes_L IKXToes_R IKXWrist_L IKXWrist_R IKfake0Spine_M IKfake1Spine_M IKfake2Spine_M IKfake3Spine_M IndexFinger1_L IndexFinger1_R IndexFinger2_L IndexFinger2_R IndexFinger3End_L IndexFinger3End_R IndexFinger3_L IndexFinger3_R Knee_L Knee_L_expJNT Knee_R Knee_R_expJNT MiddleFinger1_L MiddleFinger1_R MiddleFinger2_L MiddleFinger2_R MiddleFinger3End_L MiddleFinger3End_R MiddleFinger3_L MiddleFinger3_R NeckPart1_M NeckPart2_M Neck_M PinkyFinger1_L PinkyFinger1_R PinkyFinger2_L PinkyFinger2_R PinkyFinger3End_L PinkyFinger3End_R PinkyFinger3_L PinkyFinger3_R RingFinger1_L RingFinger1_R RingFinger2_L RingFinger2_R RingFinger3End_L RingFinger3End_R RingFinger3_L RingFinger3_R Root_M Scapula_L Scapula_R ShoulderPart1_L ShoulderPart1_R ShoulderPart2_L ShoulderPart2_R Shoulder_L Shoulder_R Spine1_M ThumbFinger1_L ThumbFinger1_R ThumbFinger2_L ThumbFinger2_R ThumbFinger3End_L ThumbFinger3End_R ThumbFinger3_L ThumbFinger3_R ToesEnd_L ToesEnd_R ToesEnd_R_expJNT Toes_L Toes_R Toes_R_expJNT TwistBalancerChest_M TwistBalancerElbow_L TwistBalancerElbow_R TwistBalancerHead_M TwistBalancerHip_L TwistBalancerHip_R TwistBalancerKnee_L TwistBalancerKnee_R TwistBalancerNeck_M TwistBalancerShoulder_L TwistBalancerShoulder_R TwistBalancerWrist_L TwistBalancerWrist_R UnTwistChest_M UnTwistElbow_L UnTwistElbow_R UnTwistEndChest_M UnTwistEndElbow_L UnTwistEndElbow_R UnTwistEndHead_M UnTwistEndHip_L UnTwistEndHip_R UnTwistEndKnee_L UnTwistEndKnee_R UnTwistEndNeck_M UnTwistEndShoulder_L UnTwistEndShoulder_R UnTwistEndWrist_L UnTwistEndWrist_R UnTwistHead_M UnTwistHip_L UnTwistHip_R UnTwistKnee_L UnTwistKnee_R UnTwistNeck_M UnTwistShoulder_L UnTwistShoulder_R UnTwistWrist_L UnTwistWrist_R Wrist_L Wrist_R ankle_L_expJNT ballfoot_L_expJNT clav_L_expJNT clav_R_expJNT elbow_01_twist_R_expJNT elbow_02_twist_R_expJNT elbow_L_expJNT elbow_R_expJNT elbow_twist_01_L_expJNT elbow_twist_02_L_expJNT head_tip_expJNT hip_expJNT index_01_L_expJNT index_01_R_expJNT index_02_L_expJNT index_02_R_expJNT index_03_L_expJNT index_03_R_expJNT index_04_tip_L_expJNT index_04_tip_R_expJNT middle_01_L_expJNT middle_01_R_expJNT middle_02_L_expJNT middle_02_R_expJNT middle_03_L_expJNT middle_03_R_expJNT middle_04_L_expJNT middle_04_tip_R_expJNT neck_01_expJNT neck_02_expJNT neck_03_expJNT neck_04_expJNT pinky_01_L_expJNT pinky_01_R_expJNT pinky_02_L_expJNT pinky_02_R_expJNT pinky_03_L_expJNT pinky_03_R_expJNT pinky_04_L_tip_expJNT pinky_04_tip_R_expJNT ring_01_L_expJNT ring_01_R_expJNT ring_02_L_expJNT ring_02_R_expJNT ring_03_L_expJNT ring_03_R_expJNT ring_04_L_tip_expJNT ring_04_tip_R_expJNT root_expJNT shldr_01_twist_R_expJNT shldr_02_twist_R_expJNT shldr_L_expJNT shldr_R_expJNT shldr_twist01_L_expJNT shldr_twist02_L_expJNT spine_01_expJNT spine_02_expJNT thumb01_R_expJNT thumb02_R_expJNT thumb03_R_expJNT thumb04_tip_R_expJNT thumb_01_L_expJNT thumb_02_L_expJNT thumb_03_L_expJNT thumb_04_L_tip_expJNT toe_L_tip_expJNT wrst_L_expJNT; } proc removeDriverRig() { select -r Main ; pickWalk -d up; doDelete; select -cl; } proc createExportRig() { //constrain new joints to the as4 deformation skeleton select -cl; joint -p 0 0 0 -n"root_expJNT"; joint -p 0 0 0 -n"hip_expJNT";//hip_expJNT will be as4's "root" select -r Root_M ; select -add hip_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"spine_01_expJNT"; select -r Spine1_M ; select -add spine_01_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"spine_02_expJNT"; select -r Chest_M ; select -add spine_02_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"neck_01_expJNT"; select -r Neck_M ; select -add neck_01_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"neck_02_expJNT"; select -r NeckPart1_M ; select -add neck_02_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"neck_03_expJNT"; select -r NeckPart2_M ; select -add neck_03_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"neck_04_expJNT"; select -r Head_M ; select -add neck_04_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"head_tip_expJNT"; select -r HeadEnd_M ; select -add head_tip_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; /*------ end head , start left arm ---------*/ joint -p 0 0 0 -n"clav_L_expJNT"; select -r Scapula_L ; select -add clav_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"shldr_L_expJNT"; select -r Shoulder_L ; select -add shldr_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"shldr_twist01_L_expJNT"; select -r ShoulderPart1_L ; select -add shldr_twist01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"shldr_twist02_L_expJNT"; select -r ShoulderPart2_L ; select -add shldr_twist02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"elbow_L_expJNT"; select -r Elbow_L ; select -add elbow_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"elbow_twist_01_L_expJNT"; select -r ElbowPart1_L ; select -add elbow_twist_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"elbow_twist_02_L_expJNT"; select -r ElbowPart2_L ; select -add elbow_twist_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"wrst_L_expJNT"; select -r Wrist_L ; select -add wrst_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_01_L_expJNT"; select -r IndexFinger1_L ; select -add index_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_02_L_expJNT"; select -r IndexFinger2_L ; select -add index_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_03_L_expJNT"; select -r IndexFinger3_L ; select -add index_03_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_04_tip_L_expJNT"; select -r IndexFinger3End_L ; select -add index_04_tip_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_01_L_expJNT"; select -r MiddleFinger1_L ; select -add middle_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_02_L_expJNT"; select -r MiddleFinger2_L ; select -add middle_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_03_L_expJNT"; select -r MiddleFinger3_L ; select -add middle_03_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_04_L_expJNT"; select -r MiddleFinger3End_L ; select -add middle_04_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_01_L_expJNT"; select -r RingFinger1_L ; select -add ring_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_02_L_expJNT"; select -r RingFinger2_L ; select -add ring_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_03_L_expJNT"; select -r RingFinger3_L ; select -add ring_03_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_04_L_tip_expJNT"; select -r RingFinger3End_L ; select -add ring_04_L_tip_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_01_L_expJNT"; select -r PinkyFinger1_L ; select -add pinky_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_02_L_expJNT"; select -r PinkyFinger2_L ; select -add pinky_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_03_L_expJNT"; select -r PinkyFinger3_L ; select -add pinky_03_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_04_L_tip_expJNT"; select -r PinkyFinger3End_L ; select -add pinky_04_L_tip_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb_01_L_expJNT"; select -r ThumbFinger1_L ; select -add thumb_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb_02_L_expJNT"; select -r ThumbFinger2_L ; select -add thumb_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb_03_L_expJNT"; select -r ThumbFinger3_L ; select -add thumb_03_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb_04_L_tip_expJNT"; select -r ThumbFinger3End_L ; select -add thumb_04_L_tip_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; /*---------- end left arm, start right arm ---------*/ joint -p 0 0 0 -n"clav_R_expJNT"; select -r Scapula_R ; select -add clav_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"shldr_R_expJNT"; select -r Shoulder_R ; select -add shldr_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"shldr_01_twist_R_expJNT"; select -r ShoulderPart1_R ; select -add shldr_01_twist_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"shldr_02_twist_R_expJNT"; select -r ShoulderPart2_R ; select -add shldr_02_twist_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"elbow_R_expJNT"; select -r Elbow_R ; select -add elbow_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"elbow_01_twist_R_expJNT"; select -r ElbowPart1_R ; select -add elbow_01_twist_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"elbow_02_twist_R_expJNT"; select -r ElbowPart2_R; select -add elbow_02_twist_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"wrst_R_expJNT"; select -r Wrist_R ; select -add wrst_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_01_R_expJNT"; select -r IndexFinger1_R ; select -add index_01_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_02_R_expJNT"; select -r IndexFinger2_R ; select -add index_02_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_03_R_expJNT"; select -r IndexFinger3_R ; select -add index_03_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"index_04_tip_R_expJNT"; select -r IndexFinger3End_R ; select -add index_04_tip_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_01_R_expJNT"; select -r MiddleFinger1_R ; select -add middle_01_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_02_R_expJNT"; select -r MiddleFinger2_R ; select -add middle_02_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_03_R_expJNT"; select -r MiddleFinger3_R ; select -add middle_03_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"middle_04_tip_R_expJNT"; select -r MiddleFinger3End_R ; select -add middle_04_tip_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_01_R_expJNT"; select -r RingFinger1_R ; select -add ring_01_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_02_R_expJNT"; select -r RingFinger2_R ; select -add ring_02_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_03_R_expJNT"; select -r RingFinger3_R ; select -add ring_03_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ring_04_tip_R_expJNT"; select -r RingFinger3End_R ; select -add ring_04_tip_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_01_R_expJNT"; select -r PinkyFinger1_R ; select -add pinky_01_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_02_R_expJNT"; select -r PinkyFinger2_R ; select -add pinky_02_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_03_R_expJNT"; select -r PinkyFinger3_R ; select -add pinky_03_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"pinky_04_tip_R_expJNT"; select -r PinkyFinger3End_R ; select -add pinky_04_tip_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb01_R_expJNT"; select -r ThumbFinger1_R ; select -add thumb01_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb02_R_expJNT"; select -r ThumbFinger2_R ; select -add thumb02_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb03_R_expJNT"; select -r ThumbFinger3_R ; select -add thumb03_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"thumb04_tip_R_expJNT"; select -r ThumbFinger3End_R ; select -add thumb04_tip_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; /*------------ end right arm , start right leg -----------*/ joint -p 0 0 0 -n"Hip_R_expJNT"; select -r Hip_R ; select -add Hip_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Hip_twist_01_R_expJNT"; select -r HipPart1_R ; select -add Hip_twist_01_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Hip_twist_02_R_expJNT"; select -r HipPart2_R ; select -add Hip_twist_02_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Knee_R_expJNT"; select -r Knee_R ; select -add Knee_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Ankle_R_expJNT"; select -r Ankle_R ; select -add Ankle_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Toes_R_expJNT"; select -r Toes_R ; select -add Toes_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ToesEnd_R_expJNT"; select -r ToesEnd_R ; select -add ToesEnd_R_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Hip_L_expJNT"; select -r Hip_L ; select -add Hip_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Hip_twist_01_L_expJNT"; select -r HipPart1_L ; select -add Hip_twist_01_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Hip_twist_02_L_expJNT"; select -r HipPart2_L ; select -add Hip_twist_02_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"Knee_L_expJNT"; select -r Knee_L ; select -add Knee_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ankle_L_expJNT"; select -r Ankle_L ; select -add ankle_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"ballfoot_L_expJNT"; select -r Toes_L ; select -add ballfoot_L_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; joint -p 0 0 0 -n"toe_L_tip_expJNT"; select -r ToesEnd_L ; select -add toe_L_tip_expJNT ; doCreateParentConstraintArgList 1 { "0","0","0","0","0","0","0","1","","1" }; parentConstraint -weight 1; select -cl; //parent them together into a hierarchy parent toe_L_tip_expJNT ballfoot_L_expJNT ; parent ballfoot_L_expJNT ankle_L_expJNT ; parent ankle_L_expJNT Knee_L_expJNT ; parent Knee_L_expJNT Hip_twist_02_L_expJNT ; parent Hip_twist_02_L_expJNT Hip_twist_01_L_expJNT ; parent Hip_twist_01_L_expJNT Hip_L_expJNT ; parent ToesEnd_R_expJNT Toes_R_expJNT ; parent Toes_R_expJNT Ankle_R_expJNT ; parent Ankle_R_expJNT Knee_R_expJNT ; parent Knee_R_expJNT Hip_twist_02_R_expJNT ; parent Hip_twist_02_R_expJNT Hip_twist_01_R_expJNT ; parent Hip_twist_01_R_expJNT Hip_R_expJNT ; parent thumb04_tip_R_expJNT thumb03_R_expJNT ; parent thumb03_R_expJNT thumb02_R_expJNT ; parent thumb02_R_expJNT thumb01_R_expJNT ; parent pinky_04_tip_R_expJNT pinky_03_R_expJNT ; parent pinky_03_R_expJNT pinky_02_R_expJNT ; parent pinky_02_R_expJNT pinky_01_R_expJNT ; parent ring_04_tip_R_expJNT ring_03_R_expJNT ; parent ring_03_R_expJNT ring_02_R_expJNT ; parent ring_02_R_expJNT ring_01_R_expJNT ; parent middle_04_tip_R_expJNT middle_03_R_expJNT ; parent middle_03_R_expJNT middle_02_R_expJNT ; parent middle_02_R_expJNT middle_01_R_expJNT ; parent index_04_tip_R_expJNT index_03_R_expJNT ; parent index_03_R_expJNT index_02_R_expJNT ; parent index_02_R_expJNT index_01_R_expJNT ; parent index_01_R_expJNT wrst_R_expJNT ; parent middle_01_R_expJNT wrst_R_expJNT ; parent ring_01_R_expJNT wrst_R_expJNT ; parent pinky_01_R_expJNT wrst_R_expJNT ; parent wrst_R_expJNT elbow_02_twist_R_expJNT ; parent elbow_02_twist_R_expJNT elbow_01_twist_R_expJNT ; parent elbow_01_twist_R_expJNT elbow_R_expJNT ; parent elbow_R_expJNT shldr_02_twist_R_expJNT ; parent shldr_02_twist_R_expJNT shldr_01_twist_R_expJNT ; parent shldr_01_twist_R_expJNT shldr_R_expJNT ; parent shldr_R_expJNT clav_R_expJNT ; parent thumb_04_L_tip_expJNT thumb_03_L_expJNT ; parent thumb_03_L_expJNT thumb_02_L_expJNT ; parent thumb_02_L_expJNT thumb_01_L_expJNT ; parent pinky_04_L_tip_expJNT pinky_03_L_expJNT ; parent pinky_03_L_expJNT pinky_02_L_expJNT ; parent pinky_02_L_expJNT pinky_01_L_expJNT ; parent ring_04_L_tip_expJNT ring_03_L_expJNT ; parent ring_03_L_expJNT ring_02_L_expJNT ; parent ring_02_L_expJNT ring_01_L_expJNT ; parent middle_04_L_expJNT middle_03_L_expJNT ; parent middle_03_L_expJNT middle_02_L_expJNT ; parent middle_02_L_expJNT middle_01_L_expJNT ; parent index_04_tip_L_expJNT index_03_L_expJNT ; parent index_03_L_expJNT index_02_L_expJNT ; parent index_02_L_expJNT index_01_L_expJNT ; parent index_01_L_expJNT wrst_L_expJNT ; parent middle_01_L_expJNT wrst_L_expJNT ; parent ring_01_L_expJNT wrst_L_expJNT ; parent pinky_01_L_expJNT wrst_L_expJNT ; parent thumb_01_L_expJNT wrst_L_expJNT ; parent wrst_L_expJNT elbow_twist_02_L_expJNT ; parent elbow_twist_02_L_expJNT elbow_twist_01_L_expJNT ; parent elbow_twist_01_L_expJNT elbow_L_expJNT ; parent elbow_L_expJNT shldr_twist02_L_expJNT ; parent shldr_twist02_L_expJNT shldr_twist01_L_expJNT ; parent shldr_twist01_L_expJNT shldr_L_expJNT ; parent shldr_L_expJNT clav_L_expJNT ; parent head_tip_expJNT neck_04_expJNT ; parent neck_04_expJNT neck_03_expJNT ; parent neck_03_expJNT neck_02_expJNT ; parent neck_02_expJNT neck_01_expJNT ; parent neck_01_expJNT spine_02_expJNT ; parent spine_02_expJNT spine_01_expJNT ; parent spine_01_expJNT hip_expJNT ; parent clav_L_expJNT spine_02_expJNT ; parent clav_R_expJNT spine_02_expJNT ; parent Hip_R_expJNT hip_expJNT ; parent Hip_L_expJNT hip_expJNT ; parent thumb01_R_expJNT wrst_R_expJNT ; global string $currentInput; print($currentInput); group -em -name ($currentInput + "01"); parent root_expJNT ($currentInput + "01") ; select -cl; print ("Rig Finished"); }