//This file has been generated by AdvancedSkeletonSelector// //Using AdvancedSkeleton Version: 5.52// global proc asSelectorface () { if (`window -q -ex asSelectorface`) { asPopulateNameSpaceMenu asSelectorface; asShowSelJob; asSelChange; showWindow asSelectorface; return; } string $asSelectorScriptLocation=`asSelectorScriptLocation`; string $asIconLocation=$asSelectorScriptLocation+"face/"; window -rtf 1 -mb 1 -t face asSelectorface; menu -l File; menuItem -l "Create Reference.." -c "asReferenceBrowser 0"; menuItem -l "Reference Editor" -c "asReferenceEditor"; menuItem -d 1; menuItem -l "Export Fbx.." -c "asExportFbxBrowser asSelectorface"; setParent..; menu -l Edit; menuItem -l Refresh -c "asPopulateNameSpaceMenu asSelectorface"; menuItem -l Filter -c "asFilterNameSpaceMenuUI asSelectorface"; setParent..; menu -l Display; menuItem -l Controls -c asControlsVisibilityToggle; menuItem -l "Set HotKey" -c asSetupControlVisibilityHotKeyDialog; // menuItem -d 1; // menuItem -l Joints -c "asJointsVisibilityToggle asSelectorface"; menuItem -d 1; menuItem -l GimbalLock -c "asVisualizeGimbalLock asSelectorface"; menuItem -d 1; menuItem -l "FaceCtrls detach" -c "asFaceCtrlsDetach asSelectorface"; setParent..; menu -l Pose -aob 1; menuItem -l Copy -c "asCopyToClipBoard asSelectorface 0"; menuItem -l Paste -c "asPasteFromClipBoard asSelectorface 0"; menuItem -d 1; menuItem -l Reset -c "asGoToBuildPose asSelectorface"; menuItem -l Mirror -c "asMirror asSelectorface"; menuItem -optionBox 1 -c "asMirrorOptions asSelectorface"; setParent..; menu -l Anim; menuItem -l Copy -c "asCopyToClipBoard asSelectorface 1"; menuItem -l Paste -c "asPasteFromClipBoard asSelectorface 1"; menuItem -d 1; menuItem -l Clean -c "asDeleteStaticChannels asSelectorface"; menuItem -d 1; menuItem -l Bake -c "asAnimBake asSelectorface"; menuItem -d 1; menuItem -l SwitchFKIK -c asAutoSwitchFKIK; menuItem -l SwitchPivot -c asAutoSwitchPivot; menuItem -d 1; menuItem -l QuickIK -c asQuickIK; menuItem -d 1; menuItem -l TwistFlip -c "asTwistFlipUI asSelectorface"; menuItem -d 1; menuItem -l MoCapMatcher -c "asMoCapMatcherUI asSelectorface"; menuItem -l MoCapLibrary -c "asMoCapLibraryUI asSelectorface"; menuItem -d 1; menuItem -l "Connect ARKit" -c "asConnectARKitUI asSelectorface"; menuItem -l "Connect MocapX" -c "asConnectMocapX asSelectorbiped"; menuItem -d 1; menuItem -l "Auto lipsync" -c "asAutoLipSyncUI asSelectorface"; menu -l Dynamics; menuItem -l "Add to selected" -c "asDynAdd asSelectorface"; menuItem -l "Remove from selected" -c "asDynRemove asSelectorface"; menuItem -d 1; menuItem -l "Set Initial State" -c "asDynSetInitialState asSelectorface"; menuItem -l "Interactive Playback" -c "asDynSetInteractivePlayback asSelectorface"; menuItem -d 1; menuItem -l Bake -c "asDynBake asSelectorface"; menu -l Parent; menuItem -l "Add parent constraint" -c "asParentAdd asSelectorface 0"; menuItem -l "Add parent constraint (Extra)" -c "asParentAdd asSelectorface 1"; columnLayout -adj 1; text -m 0 -l "FaceControlSet " asSelectorfaceControlSetsText; rowLayout -nc 5 -adj 1 -cat 1 right 0 -cw 2 30 -cw 3 65 -cw 4 50 -cw 5 60; optionMenu -cc asSelChange asSelectorfaceOptionMenu; button -l set -c "asSetNameSpaceFromSelection asSelectorface"; checkBox -v `optionVar -q asShowSelection` -onc "optionVar -iv asShowSelection 1;asSelChangeToggle;" -ofc "optionVar -iv asShowSelection 0;asSelChangeToggle;" -l Selection asSelectorfaceSelectionCheckBox; checkBox -v `optionVar -q asShowKeyed` -onc "optionVar -iv asShowKeyed 1;asSelChangeToggle;" -ofc "optionVar -iv asShowKeyed 0;asSelChangeToggle;" -l Keyed asSelectorfaceKeyedCheckBox; checkBox -v `optionVar -q asShowExtra` -onc "optionVar -iv asShowExtra 1;asSelChangeToggle;" -ofc "optionVar -iv asShowExtra 0;asSelChangeToggle;" -l Extra asSelectorfaceExtraCheckBox; setParent..; formLayout asSelectorfaceFormLayout; //Controls Begin// image -en 0 -w 400 -h 240 -i ($asIconLocation+"face_background.png") "asSelectorfaceBGPicture"; iconTextButton -w 46 -h 11 -i ($asIconLocation+"face_squashTop_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"squashTop_M\"};" -ann "squashTop_M" "squashTop_M:27:29"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"squashTop_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"squashTop_M\"};"; iconTextButton -w 46 -h 11 -i ($asIconLocation+"face_squashMiddle_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"squashMiddle_M\"};" -ann "squashMiddle_M" "squashMiddle_M:27:42"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"squashMiddle_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"squashMiddle_M\"};"; iconTextButton -w 46 -h 11 -i ($asIconLocation+"face_squashBase_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"squashBase_M\"};" -ann "squashBase_M" "squashBase_M:27:55"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"squashBase_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"squashBase_M\"};"; iconTextButton -w 22 -h 15 -i ($asIconLocation+"face_EyeBrowRegion_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowRegion_R\"};" -ann "EyeBrowRegion_R" "EyeBrowRegion_R:75:58"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowRegion_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowRegion_R\"};"; iconTextButton -w 26 -h 26 -i ($asIconLocation+"face_EyeRegion_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeRegion_R\"};" -ann "EyeRegion_R" "EyeRegion_R:73:80"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeRegion_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeRegion_R\"};"; iconTextButton -w 28 -h 51 -i ($asIconLocation+"face_AimEye_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"AimEye_M\"};" -ann "AimEye_M" "AimEye_M:38:100"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"AimEye_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"AimEye_M\"};"; iconTextButton -w 15 -h 10 -i ($asIconLocation+"face_AimEye_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"AimEye_R\"};" -ann "AimEye_R" "AimEye_R:22:110"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"AimEye_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"AimEye_R\"};"; iconTextButton -w 15 -h 10 -i ($asIconLocation+"face_AimEye_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"AimEye_L\"};" -ann "AimEye_L" "AimEye_L:67:110"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"AimEye_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"AimEye_L\"};"; iconTextButton -w 30 -h 14 -i ($asIconLocation+"face_upperFace_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperFace_M\"};" -ann "upperFace_M" "upperFace_M:86:118"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperFace_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperFace_M\"};"; iconTextButton -w 30 -h 14 -i ($asIconLocation+"face_middleFace_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"middleFace_M\"};" -ann "middleFace_M" "middleFace_M:92:137"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"middleFace_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"middleFace_M\"};"; iconTextButton -w 36 -h 14 -i ($asIconLocation+"face_lowerFace_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerFace_M\"};" -ann "lowerFace_M" "lowerFace_M:93:155"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerFace_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerFace_M\"};"; iconTextButton -w 48 -h 9 -i ($asIconLocation+"face_LipRegion_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"LipRegion_M\"};" -ann "LipRegion_M" "LipRegion_M:81:181"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"LipRegion_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"LipRegion_M\"};"; iconTextButton -w 42 -h 24 -i ($asIconLocation+"face_FaceControlSet_OffK0.png") -iol "" -c "asSelect \"face\" {\"FaceControlSet\"};" -ann "FaceControlSet" "FaceControlSet:49:4"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"FaceControlSet\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"FaceControlSet\"};"; iconTextButton -w 48 -h 9 -i ($asIconLocation+"face_Tongue0_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"Tongue0_M\"};" -ann "Tongue0_M" "Tongue0_M:27:163"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Tongue0_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Tongue0_M\"};"; iconTextButton -w 48 -h 9 -i ($asIconLocation+"face_Tongue1_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"Tongue1_M\"};" -ann "Tongue1_M" "Tongue1_M:27:179"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Tongue1_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Tongue1_M\"};"; iconTextButton -w 48 -h 9 -i ($asIconLocation+"face_Tongue2_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"Tongue2_M\"};" -ann "Tongue2_M" "Tongue2_M:27:194"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Tongue2_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Tongue2_M\"};"; iconTextButton -w 48 -h 9 -i ($asIconLocation+"face_Tongue3_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"Tongue3_M\"};" -ann "Tongue3_M" "Tongue3_M:27:209"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Tongue3_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Tongue3_M\"};"; iconTextButton -w 98 -h 14 -i ($asIconLocation+"face_Jaw_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"Jaw_M\"};" -ann "Jaw_M" "Jaw_M:151:224"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Jaw_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Jaw_M\"};"; iconTextButton -w 43 -h 10 -i ($asIconLocation+"face_upperTeeth_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperTeeth_M\"};" -ann "upperTeeth_M" "upperTeeth_M:267:174"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperTeeth_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperTeeth_M\"};"; iconTextButton -w 43 -h 10 -i ($asIconLocation+"face_lowerTeeth_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerTeeth_M\"};" -ann "lowerTeeth_M" "lowerTeeth_M:267:188"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerTeeth_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerTeeth_M\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlBrow_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlBrow_R\"};" -ann "ctrlBrow_R" "ctrlBrow_R:333:37"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlBrow_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlBrow_R\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlBrow_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlBrow_L\"};" -ann "ctrlBrow_L" "ctrlBrow_L:367:37"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlBrow_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlBrow_L\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlEye_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlEye_R\"};" -ann "ctrlEye_R" "ctrlEye_R:333:65"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlEye_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlEye_R\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlEye_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlEye_L\"};" -ann "ctrlEye_L" "ctrlEye_L:367:65"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlEye_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlEye_L\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlCheek_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlCheek_R\"};" -ann "ctrlCheek_R" "ctrlCheek_R:333:94"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlCheek_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlCheek_R\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlCheek_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlCheek_L\"};" -ann "ctrlCheek_L" "ctrlCheek_L:367:94"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlCheek_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlCheek_L\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlNose_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlNose_R\"};" -ann "ctrlNose_R" "ctrlNose_R:333:122"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlNose_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlNose_R\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlNose_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlNose_L\"};" -ann "ctrlNose_L" "ctrlNose_L:367:122"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlNose_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlNose_L\"};"; iconTextButton -w 34 -h 33 -i ($asIconLocation+"face_ctrlMouth_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlMouth_M\"};" -ann "ctrlMouth_M" "ctrlMouth_M:346:151"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlMouth_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlMouth_M\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlMouthCorner_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlMouthCorner_R\"};" -ann "ctrlMouthCorner_R" "ctrlMouthCorner_R:333:188"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlMouthCorner_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlMouthCorner_R\"};"; iconTextButton -w 26 -h 24 -i ($asIconLocation+"face_ctrlMouthCorner_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlMouthCorner_L\"};" -ann "ctrlMouthCorner_L" "ctrlMouthCorner_L:367:188"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlMouthCorner_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlMouthCorner_L\"};"; iconTextButton -w 79 -h 11 -i ($asIconLocation+"face_ctrlBox_OffK0.png") -iol "" -c "asSelect \"face\" {\"ctrlBox\"};" -ann "ctrlBox" "ctrlBox:320:216"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"ctrlBox\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"ctrlBox\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_EyeBrowInner_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowInner_R\"};" -ann "EyeBrowInner_R" "EyeBrowInner_R:175:51"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowInner_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowInner_R\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowMid1_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMid1_R\"};" -ann "EyeBrowMid1_R" "EyeBrowMid1_R:160:49"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMid1_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMid1_R\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowMid2_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMid2_R\"};" -ann "EyeBrowMid2_R" "EyeBrowMid2_R:148:50"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMid2_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMid2_R\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowMid3_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMid3_R\"};" -ann "EyeBrowMid3_R" "EyeBrowMid3_R:136:53"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMid3_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMid3_R\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowOuter_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowOuter_R\"};" -ann "EyeBrowOuter_R" "EyeBrowOuter_R:127:60"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowOuter_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowOuter_R\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_upperLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLid_R\"};" -ann "upperLid_R" "upperLid_R:154:69"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLid_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_upperOuterLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperOuterLid_R\"};" -ann "upperOuterLid_R" "upperOuterLid_R:141:76"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperOuterLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperOuterLid_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_lowerOuterLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerOuterLid_R\"};" -ann "lowerOuterLid_R" "lowerOuterLid_R:143:98"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerOuterLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerOuterLid_R\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_lowerLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLid_R\"};" -ann "lowerLid_R" "lowerLid_R:154:99"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLid_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_lowerInnerLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerInnerLid_R\"};" -ann "lowerInnerLid_R" "lowerInnerLid_R:172:98"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerInnerLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerInnerLid_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_upperInnerLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperInnerLid_R\"};" -ann "upperInnerLid_R" "upperInnerLid_R:173:76"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperInnerLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperInnerLid_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_outerLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"outerLid_R\"};" -ann "outerLid_R" "outerLid_R:136:89"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"outerLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"outerLid_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_innerLid_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"innerLid_R\"};" -ann "innerLid_R" "innerLid_R:180:89"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"innerLid_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"innerLid_R\"};"; iconTextButton -w 20 -h 7 -i ($asIconLocation+"face_CheekRaiser_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"CheekRaiser_R\"};" -ann "CheekRaiser_R" "CheekRaiser_R:151:122"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"CheekRaiser_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"CheekRaiser_R\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_Cheek_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"Cheek_R\"};" -ann "Cheek_R" "Cheek_R:132:138"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Cheek_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Cheek_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_NoseCorner_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"NoseCorner_R\"};" -ann "NoseCorner_R" "NoseCorner_R:174:134"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"NoseCorner_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"NoseCorner_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_Nostril_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"Nostril_R\"};" -ann "Nostril_R" "Nostril_R:185:128"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Nostril_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Nostril_R\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_Nose_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"Nose_M\"};" -ann "Nose_M" "Nose_M:194:133"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Nose_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Nose_M\"};"; iconTextButton -w 12 -h 10 -i ($asIconLocation+"face_NoseUnder_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"NoseUnder_M\"};" -ann "NoseUnder_M" "NoseUnder_M:194:147"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"NoseUnder_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"NoseUnder_M\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_NoseSide_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"NoseSide_R\"};" -ann "NoseSide_R" "NoseSide_R:177:117"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"NoseSide_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"NoseSide_R\"};"; iconTextButton -w 12 -h 10 -i ($asIconLocation+"face_NoseMiddle_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"NoseMiddle_M\"};" -ann "NoseMiddle_M" "NoseMiddle_M:194:108"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"NoseMiddle_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"NoseMiddle_M\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_upperLip_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLip_M\"};" -ann "upperLip_M" "upperLip_M:194:166"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLip_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLip_M\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_lowerLip_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLip_M\"};" -ann "lowerLip_M" "lowerLip_M:194:182"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLip_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLip_M\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_Lip_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"Lip_R\"};" -ann "Lip_R" "Lip_R:165:170"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Lip_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Lip_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_upperLipA_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLipA_R\"};" -ann "upperLipA_R" "upperLipA_R:184:165"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLipA_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLipA_R\"};"; iconTextButton -w 8 -h 7 -i ($asIconLocation+"face_upperLipB_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLipB_R\"};" -ann "upperLipB_R" "upperLipB_R:173:165"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLipB_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLipB_R\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_lowerLipA_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLipA_R\"};" -ann "lowerLipA_R" "lowerLipA_R:182:182"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLipA_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLipA_R\"};"; iconTextButton -w 8 -h 7 -i ($asIconLocation+"face_lowerLipB_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLipB_R\"};" -ann "lowerLipB_R" "lowerLipB_R:172:179"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLipB_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLipB_R\"};"; iconTextButton -w 12 -h 10 -i ($asIconLocation+"face_EyeBrowMiddle_M_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMiddle_M\"};" -ann "EyeBrowMiddle_M" "EyeBrowMiddle_M:194:56"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMiddle_M\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMiddle_M\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_FrownBulge_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"FrownBulge_R\"};" -ann "FrownBulge_R" "FrownBulge_R:161:186"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"FrownBulge_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"FrownBulge_R\"};"; iconTextButton -w 8 -h 20 -i ($asIconLocation+"face_SmileBulge_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"SmileBulge_R\"};" -ann "SmileBulge_R" "SmileBulge_R:144:157"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"SmileBulge_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"SmileBulge_R\"};"; iconTextButton -w 9 -h 22 -i ($asIconLocation+"face_SmilePull_R_OffK0.png") -iol "" -c "asSelect \"face\" {\"SmilePull_R\"};" -ann "SmilePull_R" "SmilePull_R:155:158"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"SmilePull_R\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"SmilePull_R\"};"; iconTextButton -w 22 -h 15 -i ($asIconLocation+"face_EyeBrowRegion_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowRegion_L\"};" -ann "EyeBrowRegion_L" "EyeBrowRegion_L:303:58"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowRegion_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowRegion_L\"};"; iconTextButton -w 26 -h 26 -i ($asIconLocation+"face_EyeRegion_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeRegion_L\"};" -ann "EyeRegion_L" "EyeRegion_L:301:80"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeRegion_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeRegion_L\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_EyeBrowInner_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowInner_L\"};" -ann "EyeBrowInner_L" "EyeBrowInner_L:210:51"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowInner_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowInner_L\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowMid1_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMid1_L\"};" -ann "EyeBrowMid1_L" "EyeBrowMid1_L:228:49"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMid1_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMid1_L\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowMid2_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMid2_L\"};" -ann "EyeBrowMid2_L" "EyeBrowMid2_L:240:50"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMid2_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMid2_L\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowMid3_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowMid3_L\"};" -ann "EyeBrowMid3_L" "EyeBrowMid3_L:252:53"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowMid3_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowMid3_L\"};"; iconTextButton -w 12 -h 12 -i ($asIconLocation+"face_EyeBrowOuter_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"EyeBrowOuter_L\"};" -ann "EyeBrowOuter_L" "EyeBrowOuter_L:261:60"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"EyeBrowOuter_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"EyeBrowOuter_L\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_upperLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLid_L\"};" -ann "upperLid_L" "upperLid_L:231:69"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLid_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_upperOuterLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperOuterLid_L\"};" -ann "upperOuterLid_L" "upperOuterLid_L:250:76"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperOuterLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperOuterLid_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_lowerOuterLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerOuterLid_L\"};" -ann "lowerOuterLid_L" "lowerOuterLid_L:248:98"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerOuterLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerOuterLid_L\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_lowerLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLid_L\"};" -ann "lowerLid_L" "lowerLid_L:231:99"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLid_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_lowerInnerLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerInnerLid_L\"};" -ann "lowerInnerLid_L" "lowerInnerLid_L:219:98"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerInnerLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerInnerLid_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_upperInnerLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperInnerLid_L\"};" -ann "upperInnerLid_L" "upperInnerLid_L:218:76"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperInnerLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperInnerLid_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_outerLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"outerLid_L\"};" -ann "outerLid_L" "outerLid_L:255:89"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"outerLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"outerLid_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_innerLid_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"innerLid_L\"};" -ann "innerLid_L" "innerLid_L:211:89"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"innerLid_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"innerLid_L\"};"; iconTextButton -w 20 -h 7 -i ($asIconLocation+"face_CheekRaiser_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"CheekRaiser_L\"};" -ann "CheekRaiser_L" "CheekRaiser_L:229:122"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"CheekRaiser_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"CheekRaiser_L\"};"; iconTextButton -w 15 -h 15 -i ($asIconLocation+"face_Cheek_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"Cheek_L\"};" -ann "Cheek_L" "Cheek_L:253:138"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Cheek_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Cheek_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_NoseCorner_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"NoseCorner_L\"};" -ann "NoseCorner_L" "NoseCorner_L:217:134"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"NoseCorner_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"NoseCorner_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_Nostril_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"Nostril_L\"};" -ann "Nostril_L" "Nostril_L:206:128"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Nostril_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Nostril_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_NoseSide_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"NoseSide_L\"};" -ann "NoseSide_L" "NoseSide_L:214:117"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"NoseSide_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"NoseSide_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_Lip_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"Lip_L\"};" -ann "Lip_L" "Lip_L:226:170"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"Lip_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"Lip_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_upperLipA_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLipA_L\"};" -ann "upperLipA_L" "upperLipA_L:207:165"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLipA_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLipA_L\"};"; iconTextButton -w 8 -h 7 -i ($asIconLocation+"face_upperLipB_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"upperLipB_L\"};" -ann "upperLipB_L" "upperLipB_L:219:165"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"upperLipB_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"upperLipB_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_lowerLipA_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLipA_L\"};" -ann "lowerLipA_L" "lowerLipA_L:209:182"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLipA_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLipA_L\"};"; iconTextButton -w 8 -h 7 -i ($asIconLocation+"face_lowerLipB_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"lowerLipB_L\"};" -ann "lowerLipB_L" "lowerLipB_L:220:179"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"lowerLipB_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"lowerLipB_L\"};"; iconTextButton -w 9 -h 9 -i ($asIconLocation+"face_FrownBulge_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"FrownBulge_L\"};" -ann "FrownBulge_L" "FrownBulge_L:230:186"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"FrownBulge_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"FrownBulge_L\"};"; iconTextButton -w 8 -h 20 -i ($asIconLocation+"face_SmileBulge_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"SmileBulge_L\"};" -ann "SmileBulge_L" "SmileBulge_L:248:157"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"SmileBulge_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"SmileBulge_L\"};"; iconTextButton -w 9 -h 22 -i ($asIconLocation+"face_SmilePull_L_OffK0.png") -iol "" -c "asSelect \"face\" {\"SmilePull_L\"};" -ann "SmilePull_L" "SmilePull_L:236:158"; popupMenu; menuItem -l Key -c "asKey \"face\" {\"SmilePull_L\"};"; menuItem -l LinearKey -c "asLinearKey \"face\" {\"SmilePull_L\"};"; //Controls End// formLayout -e -af "squashTop_M:27:29" left 27 -af "squashTop_M:27:29" top 29 -af "squashMiddle_M:27:42" left 27 -af "squashMiddle_M:27:42" top 42 -af "squashBase_M:27:55" left 27 -af "squashBase_M:27:55" top 55 -af "EyeBrowRegion_R:75:58" left 75 -af "EyeBrowRegion_R:75:58" top 58 -af "EyeRegion_R:73:80" left 73 -af "EyeRegion_R:73:80" top 80 -af "AimEye_M:38:100" left 38 -af "AimEye_M:38:100" top 100 -af "AimEye_R:22:110" left 22 -af "AimEye_R:22:110" top 110 -af "AimEye_L:67:110" left 67 -af "AimEye_L:67:110" top 110 -af "upperFace_M:86:118" left 86 -af "upperFace_M:86:118" top 118 -af "middleFace_M:92:137" left 92 -af "middleFace_M:92:137" top 137 -af "lowerFace_M:93:155" left 93 -af "lowerFace_M:93:155" top 155 -af "LipRegion_M:81:181" left 81 -af "LipRegion_M:81:181" top 181 -af "FaceControlSet:49:4" left 49 -af "FaceControlSet:49:4" top 4 -af "Tongue0_M:27:163" left 27 -af "Tongue0_M:27:163" top 163 -af "Tongue1_M:27:179" left 27 -af "Tongue1_M:27:179" top 179 -af "Tongue2_M:27:194" left 27 -af "Tongue2_M:27:194" top 194 -af "Tongue3_M:27:209" left 27 -af "Tongue3_M:27:209" top 209 -af "Jaw_M:151:224" left 151 -af "Jaw_M:151:224" top 224 -af "upperTeeth_M:267:174" left 267 -af "upperTeeth_M:267:174" top 174 -af "lowerTeeth_M:267:188" left 267 -af "lowerTeeth_M:267:188" top 188 -af "ctrlBrow_R:333:37" left 333 -af "ctrlBrow_R:333:37" top 37 -af "ctrlBrow_L:367:37" left 367 -af "ctrlBrow_L:367:37" top 37 -af "ctrlEye_R:333:65" left 333 -af "ctrlEye_R:333:65" top 65 -af "ctrlEye_L:367:65" left 367 -af "ctrlEye_L:367:65" top 65 -af "ctrlCheek_R:333:94" left 333 -af "ctrlCheek_R:333:94" top 94 -af "ctrlCheek_L:367:94" left 367 -af "ctrlCheek_L:367:94" top 94 -af "ctrlNose_R:333:122" left 333 -af "ctrlNose_R:333:122" top 122 -af "ctrlNose_L:367:122" left 367 -af "ctrlNose_L:367:122" top 122 -af "ctrlMouth_M:346:151" left 346 -af "ctrlMouth_M:346:151" top 151 -af "ctrlMouthCorner_R:333:188" left 333 -af "ctrlMouthCorner_R:333:188" top 188 -af "ctrlMouthCorner_L:367:188" left 367 -af "ctrlMouthCorner_L:367:188" top 188 -af "ctrlBox:320:216" left 320 -af "ctrlBox:320:216" top 216 -af "EyeBrowInner_R:175:51" left 175 -af "EyeBrowInner_R:175:51" top 51 -af "EyeBrowMid1_R:160:49" left 160 -af "EyeBrowMid1_R:160:49" top 49 -af "EyeBrowMid2_R:148:50" left 148 -af "EyeBrowMid2_R:148:50" top 50 -af "EyeBrowMid3_R:136:53" left 136 -af "EyeBrowMid3_R:136:53" top 53 -af "EyeBrowOuter_R:127:60" left 127 -af "EyeBrowOuter_R:127:60" top 60 -af "upperLid_R:154:69" left 154 -af "upperLid_R:154:69" top 69 -af "upperOuterLid_R:141:76" left 141 -af "upperOuterLid_R:141:76" top 76 -af "lowerOuterLid_R:143:98" left 143 -af "lowerOuterLid_R:143:98" top 98 -af "lowerLid_R:154:99" left 154 -af "lowerLid_R:154:99" top 99 -af "lowerInnerLid_R:172:98" left 172 -af "lowerInnerLid_R:172:98" top 98 -af "upperInnerLid_R:173:76" left 173 -af "upperInnerLid_R:173:76" top 76 -af "outerLid_R:136:89" left 136 -af "outerLid_R:136:89" top 89 -af "innerLid_R:180:89" left 180 -af "innerLid_R:180:89" top 89 -af "CheekRaiser_R:151:122" left 151 -af "CheekRaiser_R:151:122" top 122 -af "Cheek_R:132:138" left 132 -af "Cheek_R:132:138" top 138 -af "NoseCorner_R:174:134" left 174 -af "NoseCorner_R:174:134" top 134 -af "Nostril_R:185:128" left 185 -af "Nostril_R:185:128" top 128 -af "Nose_M:194:133" left 194 -af "Nose_M:194:133" top 133 -af "NoseUnder_M:194:147" left 194 -af "NoseUnder_M:194:147" top 147 -af "NoseSide_R:177:117" left 177 -af "NoseSide_R:177:117" top 117 -af "NoseMiddle_M:194:108" left 194 -af "NoseMiddle_M:194:108" top 108 -af "upperLip_M:194:166" left 194 -af "upperLip_M:194:166" top 166 -af "lowerLip_M:194:182" left 194 -af "lowerLip_M:194:182" top 182 -af "Lip_R:165:170" left 165 -af "Lip_R:165:170" top 170 -af "upperLipA_R:184:165" left 184 -af "upperLipA_R:184:165" top 165 -af "upperLipB_R:173:165" left 173 -af "upperLipB_R:173:165" top 165 -af "lowerLipA_R:182:182" left 182 -af "lowerLipA_R:182:182" top 182 -af "lowerLipB_R:172:179" left 172 -af "lowerLipB_R:172:179" top 179 -af "EyeBrowMiddle_M:194:56" left 194 -af "EyeBrowMiddle_M:194:56" top 56 -af "FrownBulge_R:161:186" left 161 -af "FrownBulge_R:161:186" top 186 -af "SmileBulge_R:144:157" left 144 -af "SmileBulge_R:144:157" top 157 -af "SmilePull_R:155:158" left 155 -af "SmilePull_R:155:158" top 158 -af "EyeBrowRegion_L:303:58" left 303 -af "EyeBrowRegion_L:303:58" top 58 -af "EyeRegion_L:301:80" left 301 -af "EyeRegion_L:301:80" top 80 -af "EyeBrowInner_L:210:51" left 210 -af "EyeBrowInner_L:210:51" top 51 -af "EyeBrowMid1_L:228:49" left 228 -af "EyeBrowMid1_L:228:49" top 49 -af "EyeBrowMid2_L:240:50" left 240 -af "EyeBrowMid2_L:240:50" top 50 -af "EyeBrowMid3_L:252:53" left 252 -af "EyeBrowMid3_L:252:53" top 53 -af "EyeBrowOuter_L:261:60" left 261 -af "EyeBrowOuter_L:261:60" top 60 -af "upperLid_L:231:69" left 231 -af "upperLid_L:231:69" top 69 -af "upperOuterLid_L:250:76" left 250 -af "upperOuterLid_L:250:76" top 76 -af "lowerOuterLid_L:248:98" left 248 -af "lowerOuterLid_L:248:98" top 98 -af "lowerLid_L:231:99" left 231 -af "lowerLid_L:231:99" top 99 -af "lowerInnerLid_L:219:98" left 219 -af "lowerInnerLid_L:219:98" top 98 -af "upperInnerLid_L:218:76" left 218 -af "upperInnerLid_L:218:76" top 76 -af "outerLid_L:255:89" left 255 -af "outerLid_L:255:89" top 89 -af "innerLid_L:211:89" left 211 -af "innerLid_L:211:89" top 89 -af "CheekRaiser_L:229:122" left 229 -af "CheekRaiser_L:229:122" top 122 -af "Cheek_L:253:138" left 253 -af "Cheek_L:253:138" top 138 -af "NoseCorner_L:217:134" left 217 -af "NoseCorner_L:217:134" top 134 -af "Nostril_L:206:128" left 206 -af "Nostril_L:206:128" top 128 -af "NoseSide_L:214:117" left 214 -af "NoseSide_L:214:117" top 117 -af "Lip_L:226:170" left 226 -af "Lip_L:226:170" top 170 -af "upperLipA_L:207:165" left 207 -af "upperLipA_L:207:165" top 165 -af "upperLipB_L:219:165" left 219 -af "upperLipB_L:219:165" top 165 -af "lowerLipA_L:209:182" left 209 -af "lowerLipA_L:209:182" top 182 -af "lowerLipB_L:220:179" left 220 -af "lowerLipB_L:220:179" top 179 -af "FrownBulge_L:230:186" left 230 -af "FrownBulge_L:230:186" top 186 -af "SmileBulge_L:248:157" left 248 -af "SmileBulge_L:248:157" top 157 -af "SmilePull_L:236:158" left 236 -af "SmilePull_L:236:158" top 158 asSelectorfaceFormLayout; asPopulateNameSpaceMenu "asSelectorface"; asShowSelJob; asSelChange; showWindow; } asSelectorface; //-- ASTools Procedures Starts Here --// global proc asSelChange () { global int $asfileLoading; global int $asSelChangeSwitching; if ($asfileLoading) return; if (!`optionVar -q asShowSelection` && !`optionVar -q asShowKeyed` && !$asSelChangeSwitching) return; int $undoState=`undoInfo -q -state`; string $sel[]=`ls -sl`; string $name,$obj,$nodeType,$projectName,$ann; string $ctls[],$buffer[],$connections[]; int $numLetters,$numTok,$keyed; string $ext=".xpm"; if (`asMayaVersionAsFloat`>=2011) $ext=".png"; if (`about -linux`) $ext=".xpm"; string $currImage,$buttonImageFile,$buttonImageFileOnK0,$buttonImageFileOnK1,$buttonImageFileOffK0,$buttonImageFileOffK1; string $windows[]=`lsUI -windows`; string $layout; for ($window in $windows) { $layout=""; if (size($window)>11) $layout="asSelector"+`substring $window 11 999`+"FormLayout"; if (!`formLayout -q -ex $layout`) continue; $numLetters=size($layout); $name=`substring $layout 11 ($numLetters-10)`; $ctls=`formLayout -q -ca $layout`; for ($ctl in $ctls) { if (!`iconTextButton -q -ex $ctl`) continue; if (`optionVar -q asShowSelection` && !$asSelChangeSwitching) $selState="On"; else $selState="Off"; $keyed=0; $ann=`iconTextButton -q -ann $ctl`; $numTok=`tokenize $ann ";" $buffer`; for ($i=0;$i<$numTok;$i++) { $obj=`asSelectorResolveNameSpace $name $buffer[$i]`; if (!`stringArrayCount $obj $sel`) $selState="Off"; if (`optionVar -q asShowKeyed` && !$asSelChangeSwitching && `objExists $obj`) { $connections=`listConnections -s 1 -d 0 $obj`; for ($node in $connections) { $nodeType=`objectType $node`; if (`gmatch $nodeType "animCurve*"`) $keyed=1; } } } $currImage=`iconTextButton -q -i1 $ctl`; if ($currImage=="") return; $numTok=`tokenize $currImage "_" $buffer`; if ($numTok<3) continue; $projectName=$buffer[0]; for ($b=1;$b $chrNs { $chrCtrl=`substitute $picNs $sel[$i] $chrNs`; if (`optionVar -q asShowExtra`) $chrCtrl=`substitute "FK" $chrCtrl "FKExtra"`; if (`objExists $chrCtrl` && `optionVar -q asShowSelection`) { select -d $sel[$i]; select -add $chrCtrl; if (`optionVar -q asShowKeyed` && `asHaveAnimation $chrCtrl`) $overrideColor=13; setAttr ($sel[$i]+".overrideColor") $overrideColor; } else print ("// "+$chrCtrl+" not found.\n"); } if (`gmatch $sel[$i] ($chrNs+"*")`) // $chrNs > $picNs { if ($chrNs=="") $picCtrl=$picNs+$sel[$i]; else $picCtrl=`substitute $chrNs $sel[$i] $picNs`; if (`optionVar -q asShowExtra`) { if (!`gmatch $picCtrl "*Extra*"`) continue; $picCtrl=`substitute "FKExtra" $picCtrl "FK"`; } if (`objExists $picCtrl`) setAttr ($picCtrl+".overrideColor") $overrideColor; } } if ($undoState) undoInfo -stateWithoutFlush 1; } global proc asFL () { string $framLayouts[]=`lsUI -type frameLayout`; for ($i=0;$i2) { $extraObj=`substring $obj 1 2`+"Extra"+`substring $obj 3 99`; if (`gmatch $obj "*RootX*"`) $extraObj=`substring $obj 1 4`+"Extra"+`substring $obj 5 99`; if (`objExists ($nameSpace+$extraObj)`) return ($nameSpace+$extraObj); } return ($nameSpace+$obj); } global proc asSelect (string $name, string $objs[]) { for ($i=0;$i>`; $tempFloat[1]=`mag<<$posA[0]-$posB[0],$posA[1]-$posB[1],$posA[2]-$posB[2]>>`; setAttr ($nameSpace+"IK"+$IK+$side+".Lenght1") (($tempFloat[0]/(`getAttr ($nameSpace+"IKX"+$middleJoint+$side+"_IKLenght"+$side+".input2X")`*$b))/`getAttr ("IKX"+$middleJoint+$side+"_IKmessureDiv"+$side+".input1X")`); setAttr ($nameSpace+"IK"+$IK+$side+".Lenght2") (($tempFloat[1]/(`getAttr ($nameSpace+"IKX"+$endJoint+$side+"_IKLenght"+$side+".input2X")`*$b))/`getAttr ("IKX"+$middleJoint+$side+"_IKmessureDiv"+$side+".input1X")`); } } if ($W2K=="FK2IK" && $isSplineIK) { //first do Start and End IkCtrls $tempFloat=`xform -q -ws -t ($nameSpace+"AlignIKTo"+$chainJoints[0])`; xform -ws -t $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"IK"+$IK+"1"+$side); $roo=`xform -q -roo ($nameSpace+"IK"+$IK+"1"+$side)`; xform -p 1 -roo $roo ($nameSpace+"AlignIKTo"+$chainJoints[0]); $tempFloat=`xform -q -ws -ro ($nameSpace+"AlignIKTo"+$chainJoints[0])`; xform -ws -ro $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"IK"+$IK+"1"+$side); $tempFloat=`xform -q -ws -t ($nameSpace+"AlignIKTo"+$chainJoints[size($chainJoints)-1])`; xform -ws -t $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"IK"+$IK+$numIkCtrls+$side); $roo=`xform -q -roo ($nameSpace+"IK"+$IK+$numIkCtrls+$side)`; xform -p 1 -roo $roo ($nameSpace+"AlignIKTo"+$chainJoints[size($chainJoints)-1]); $tempFloat=`xform -q -ws -ro ($nameSpace+"AlignIKTo"+$chainJoints[size($chainJoints)-1])`; xform -ws -ro $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"IK"+$IK+$numIkCtrls+$side); $curveCmd="curve -n FK2IKCurve -d 1"; for ($i=0;$i0.01) { //volume $tempFloat=`getAttr ($nameSpace+$startJoint+$side+".s")`; setAttr ($nameSpace+"FK"+$startJoint+$side+".s") -type float3 $tempFloat[0] $tempFloat[1] $tempFloat[2]; $tempFloat=`getAttr ($nameSpace+$middleJoint+$side+".s")`; setAttr ($nameSpace+"FK"+$middleJoint+$side+".s") -type float3 $tempFloat[0] $tempFloat[1] $tempFloat[2]; //position $tempFloat=`xform -q -ws -t ($nameSpace+"IKX"+$middleJoint+$side)`; xform -ws -t $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"FK"+$middleJoint+$side); $tempFloat=`xform -q -ws -t ($nameSpace+"IKX"+$endJoint+$side)`; xform -ws -t $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"FK"+$endJoint+$side); } //toesAim if (`attributeExists toesAim ($nameSpace+"IK"+$IK+$side)`) { $tempString=`listConnections -s 0 -d 1 ($nameSpace+"IK"+$IK+"RollToesAimReverse"+$side+".outputX")`; $toesAim=`substitute ($nameSpace+"RollToesAim") $tempString[0] ""`; $toesAim=`substitute ($side+"_aimConstraint1") $toesAim ""`; if (`getAttr ($nameSpace+"IK"+$IK+$side+".toesAim")`>0) { $tempFloat=`xform -q -ws -ro ($nameSpace+"IKX"+$toesAim+$side)`; xform -ws -ro $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"FK"+$toesAim+$side); // print ("// "+$nameSpace+"IK"+$IK+$side+".toesAim is On, The FKIK will not correctly Align, for better results, turn Off the \"toesAim\" attribute.\n"); } } //qToes // for ($i=0;$i-1;$i--) { $tempFloat=`xform -q -ws -t ($nameSpace+"IKX"+$qToesJoints[$i]+$side)`; xform -ws -t $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"FK"+$qToesJoints[$i]+$side); $tempFloat=`xform -q -ws -ro ($nameSpace+"IKX"+$qToesJoints[$i]+$side)`; xform -ws -ro $tempFloat[0] $tempFloat[1] $tempFloat[2] ($nameSpace+"FK"+$qToesJoints[$i]+$side); } } if ($W2K=="IK2FK" && $isSplineIK) { for ($i=0;$i0) // $rot=`xform -q -ws -roo $roo -ro ($nameSpace+$chainJoints[$i]+"Part"+$numParts+$side)`; //Root Override, FKRoot_M can not `swing along` a Tail like IKSpine1_M can, so maybe RootX_M should be part of the switch ? xform -ws -t $pos[0] $pos[1] $pos[2] -ro $rot[0] $rot[1] $rot[2] ($nameSpace+"FK"+$chainJoints[$i]); } } if ($autoKey) autoKeyframe -st 1; if (!$autoKey && $asBakeFKIK) autoKeyframe -st 0; select $sel; } global proc asSwitchFKIK (string $nameSpace, string $IK, string $side, string $W2K) { string $sel[]=`ls -sl`; //string $nameSpace=`asSelectorResolveNameSpace $name ""`; //backwards compatibility, 1st arg used to be $name (e.g \"biped\") if (!`gmatch $nameSpace "*:*"`) $nameSpace=`asSelectorResolveNameSpace $nameSpace ""`; string $controlCurve=$nameSpace+"FKIK"+$IK+$side; string $poleCurve=$nameSpace+"Pole"+$IK+$side; if (!`objExists $controlCurve`) error ("Object:\""+$controlCurve+"\" does not exists !"); string $startJoint=`getAttr ($controlCurve+".startJoint")`; string $middleJoint=`getAttr ($controlCurve+".middleJoint")`; string $endJoint=`getAttr ($controlCurve+".endJoint")`; string $chainJoints[],$tempString[],$tempString2[]; string $toesJoint=`asGetToesJoint $nameSpace $endJoint $side`; //string $qToesJoints[]=`asGetQToesJoints $nameSpace $endJoint $side`; string $childLabel,$fkLegAim,$legAimRotCmd; float $legAimRot[]; int $isSplineIK,$numIkCtrls; if (!`objExists ($nameSpace+"Pole"+$IK+$side)`) $isSplineIK=1; string $requiredObj[]={($nameSpace+"Main"),($nameSpace+"FKX"+$startJoint+$side),($nameSpace+"IKX"+$startJoint+$side),($nameSpace+"IKX"+$middleJoint+$side)}; if ($isSplineIK) { $chainJoints=`asgetChainJoints ($nameSpace+$startJoint) ($nameSpace+$endJoint)`; for ($i=0;$i0) { warning ("Could not switch FK2IK, because \"FKIKBlend\" is not \"0\"\n"); return; } if ($W2K=="IK2FK" && `getAttr ($controlCurve+".FKIKBlend")`<10) { warning ("Could not switch IK2FK, because \"FKIKBlend\" is not \"10\"\n"); return; } //LegAim if (`attributeExists legAim ($nameSpace+"IK"+$IK+$side)`) { $tempString=`listConnections -s 0 -d 1 ($nameSpace+"IK"+$IK+"LegAimReverse"+$side)`; $fkLegAim=`substitute ($nameSpace+"LegAim") $tempString[0] ""`; $fkLegAim="FK"+`substitute ($side+"_orientConstraint1") $fkLegAim ""`; $legAimRot=`xform -q -ws -ro ($nameSpace+$fkLegAim+$side)`; $legAimRotCmd="xform -ws -ro "+$legAimRot[0]+" "+$legAimRot[1]+" "+$legAimRot[2]+" "+$nameSpace+$fkLegAim+$side; } int $autoKey=`autoKeyframe -q -st`; currentTime (`currentTime -q` -1); setAttr ($controlCurve+".FKIKBlend") $BlendInverse; for ($a=0;$a<2;$a++) { if ($autoKey) { if (!$isSplineIK) { setKeyframe ($controlCurve+".FKIKBlend"); // setKeyframe ($poleCurve+".follow"); setKeyframe ($nameSpace+"FK"+$startJoint+$side+".rotate"); setKeyframe ($nameSpace+"FK"+$startJoint+$side+".scale"); setKeyframe ($nameSpace+"FK"+$middleJoint+$side+".translate"); setKeyframe ($nameSpace+"FK"+$middleJoint+$side+".rotate"); setKeyframe ($nameSpace+"FK"+$middleJoint+$side+".scale"); setKeyframe ($nameSpace+"FK"+$endJoint+$side+".translate"); setKeyframe ($nameSpace+"FK"+$endJoint+$side+".rotate"); setKeyframe ($nameSpace+"FK"+$endJoint+$side+".scale"); if (`objExists ($nameSpace+$toesJoint)` && `objExists ($nameSpace+"FKToes"+$side)`) setKeyframe ($nameSpace+"FKToes"+$side+".rotate"); setKeyframe ($nameSpace+"IK"+$IK+$side+".translate"); setKeyframe ($nameSpace+"IK"+$IK+$side+".rotate"); setKeyframe ($nameSpace+"IK"+$IK+$side+".scale"); setKeyframe ($nameSpace+"Pole"+$IK+$side+".translate"); $tempString=`listAttr -ud ($nameSpace+"IK"+$IK+$side)`; for ($i=0;$i-1;$z--) { if ($tempString4[$z]==($nameSpace+$endJoint)) break; $qToesJoints[size($qToesJoints)]=`substitute $nameSpace $tempString4[$z] ""`; } } } } } return $qToesJoints; } global proc string[] asgetChainJoints (string $startJoint, string $endJoint) { int $startJointIsParentNr; string $chainJoints[]; string $tempString[]=`ls -l $endJoint`; tokenize $tempString[0] "|" $tempString; for ($i=size($tempString)-1;$i>-1;$i--) { $startJointIsParentNr=$i; if ($tempString[$i]==$startJoint) { break; } } for ($i=$startJointIsParentNr;$i0)) $attrs=$selectedAttrs; else $attrs=$allKeyableAttrs; for ($attr in $attrs) for ($allKeyableAttr in $allKeyableAttrs) { if (`getAttr -l ($nameSpace+$obj+"."+$attr)`) continue; if ($attr==$allKeyableAttr) { if (!$anim) $cmd+=$obj+"."+$attr+" "+`getAttr ($nameSpace+$obj+"."+$attr)`+";"; else { //Animation $animCurves=`listConnections -type animCurve -s 1 -d 0 ($nameSpace+$obj+"."+$attr)`; for ($y=0;$y0)) $attrs=$selectedAttrs; else $attrs=$allKeyableAttrs; for ($attr in $attrs) for ($allKeyableAttr in $allKeyableAttrs) { if (`getAttr -l ($nameSpace+$obj+"."+$attr)`) continue; if ($attr==$allKeyableAttr) { if (!$anim) $cmd+="setAttr "+$obj+"."+$attr+" "+`getAttr ($nameSpace+$obj+"."+$attr)`+";"; if ($anim) { //Animation $animCurves=`listConnections -type animCurve -s 1 -d 0 ($nameSpace+$obj+"."+$attr)`; for ($y=0;$y0;$x--) for ($i=0;$i0) { if (`gmatch $controls[$i] ($nameSpace+"FK*_L")` || `gmatch $controls[$i] ($nameSpace+"FK*_R")` || `gmatch $controls[$i] ($nameSpace+"Bend*_L")` || `gmatch $controls[$i] ($nameSpace+"Bend*_R")` || `attributeExists ikLocal $controls[$i]` || $isClusterLocalOrientControl) { if ($destAttr=="tx" || $destAttr=="ty" || $destAttr=="tz") $flip=-1; } else if ($destAttr=="tz" || $destAttr=="rx" || $destAttr=="ry") $flip=-1; } if ($isFaceControl) $flip=1; /* if (($controls[$i]==$nameSpace+"Eye_R" || $controls[$i]==$nameSpace+"Eye_L") && $destAttr== "ry") $flip=-1;//special case for eyes, as we dont need `crosseyed` */ $wsXformAttr=0; if ($wsScales[2]>0) if (`gmatch $controls[$i] ($nameSpace+"IK*")` || `gmatch $controls[$i] ($nameSpace+"Pole*")` || `gmatch $controls[$i] ($nameSpace+"Roll*")` || `gmatch $controls[$i] ($nameSpace+"RootX_M*")` || ($isClusterControl && !$isClusterLocalOrientControl)) if ((!`gmatch $controls[$i] ($nameSpace+"IKLocal*")`) && !`attributeExists ikLocal $controls[$i]`) if (!`gmatch $controls[$i] ($nameSpace+"IKhybrid*")`) if (!`gmatch $controls[$i] ($nameSpace+"IK*Toes*")`) $wsXform[$i]=1; if (`gmatch $controls[$i] ($nameSpace+"Aim*")`) continue; if ($destAttr=="tx" || $destAttr=="ty" || $destAttr=="tz" ||$destAttr=="rx" || $destAttr=="ry" || $destAttr=="rz") if ($wsXform[$i]) $wsXformAttr=1; if (!$wsXformAttr) if (`getAttr -se ($dest+"."+$destAttr)`) $cmd+="setAttr "+$dest+"."+$destAttr+" "+(`getAttr ($source+"."+$allKeyableAttrs[$y])`*$flip)+";"; } if ($wsXform[$i]) { $tempString=`spaceLocator`; $loc1=$tempString[0]; $tempString=`spaceLocator`; $loc2=$tempString[0]; parent $loc2 $loc1; parent $loc1 $source; xform -os -t 0 0 0 -ro 0 0 0 $loc1; setAttr ($loc1+".rotateOrder") `getAttr ($source+".rotateOrder")`; setAttr ($loc2+".rotateOrder") `getAttr ($source+".rotateOrder")`; setAttr ("flipGroup.scale"+$flipAxis) 1; parent $loc1 flipGroup; setAttr ("flipGroup.scale"+$flipAxis) -1; setAttr ($loc1+".scaleX") -1; $pos=`xform -q -ws -t $loc2`; $rot=`xform -q -ws -ro $loc2`; $pos2=`getAttr ($source+".t")`; $rot2=`getAttr ($source+".r")`; $cmd+="xform -ws -t "+$pos[0]+" "+$pos[1]+" "+$pos[2]+" -ro "+$rot[0]+" "+$rot[1]+" "+$rot[2]+" "+$dest+";"; } if (`attributeExists "mirror" $controls[$i]`) setAttr ($controls[$i]+".mirror") 0; } delete flipGroup; if ($cmd!="") eval ($cmd); select $sel; } global proc asGoToBuildPoseOptions (string $nameSpace, string $controlSet) { if (`objExists asGoToBuildPoseOptions`) delete asGoToBuildPoseOptions; createNode -n asGoToBuildPoseOptions transform; addAttr -ln nameSpace -dt "string" asGoToBuildPoseOptions; setAttr -type "string" asGoToBuildPoseOptions.nameSpace $nameSpace; addAttr -ln controlSet -dt "string" asGoToBuildPoseOptions; setAttr -type "string" asGoToBuildPoseOptions.controlSet $controlSet; asGoToBuildPose bodySetup; } global proc asGoToBuildPose (string $uiName) { int $ctrlButton; if ((`getModifiers`/4) % 2) $ctrlButton=1; string $nameSpace; string $controlSets[]; string $sel[]=`ls -sl`; if (`asHotKeyCheck "asGoToBuildPose \"\""`) return; $nameSpace=`asNameSpaceFromUIName $uiName`; $controlSets=`asNameControlSetsFromUiName $uiName`; if (!size($controlSets)) error "No controlSets detected. select a controller"; if (`objExists asGoToBuildPoseOptions`) { $nameSpace=`getAttr asGoToBuildPoseOptions.nameSpace`; $controlSets[0]=`getAttr asGoToBuildPoseOptions.controlSet`; delete asGoToBuildPoseOptions; } string $buildPose="buildPose"; if (`gmatch $controlSets[0] "*FaceControlSet"`) $buildPose="faceBuildPose"; string $tempString[],$tempString2[],$buffer[]; string $setAttrCmd,$cmd; $setAttrCmd=`getAttr ($nameSpace+$buildPose+".udAttr")`; if (`attributeExists udExtraAttr ($nameSpace+$buildPose)`) $setAttrCmd+=`getAttr ($nameSpace+$buildPose+".udExtraAttr")`; tokenize $setAttrCmd ";" $tempString; for ($y=0;$y0) { $tempString[0]=`pairBlend -nd $connectTo -at tx -at ty -at tz`; rename $tempString[0] ("parBlendT"+$dynJoints[$i]); connectAttr -f ($dynJoints[$i]+".translate") ("parBlendT"+$dynJoints[$i]+".inTranslate2"); connectAttr ($sorted[0]+".blend") ("parBlendT"+$dynJoints[$i]+".weight"); } $tempString[0]=`pairBlend -nd $connectTo -at rx -at ry -at rz`; rename $tempString[0] ("parBlendR"+$dynJoints[$i]); connectAttr -f ($dynJoints[$i]+".rotate") ("parBlendR"+$dynJoints[$i]+".inRotate2"); connectAttr ($sorted[0]+".blend") ("parBlendR"+$dynJoints[$i]+".weight"); } setAttr -l 1 ("DynIKHandle"+$name+".v") 0; print "// Dynamics added.\n"; select $sorted[0]; } global proc asDynSetInitialState (string $uiName) { if (`asHotKeyCheck "asDynSetInitialState \"\""`) return; evalEcho saveInitialState -all; } global proc asDynSetInteractivePlayback (string $uiName) { if (`asHotKeyCheck "asDynSetInteractivePlayback \"\""`) return; evalEcho InteractivePlayback; } global proc asParentAdd (string $uiName, int $extra) { string $sel[]=`ls -sl`; string $child; string $tempString[]; if (`asHotKeyCheck ("asParentAdd \"\" "+$extra)`) return; if (size($sel)<2) error "Select at least 2 objects"; string $parent=$sel[size($sel)-1]; for ($i=0;$i1) { for ($y=0;$y0 && $curFKIKBlend<5) setAttr ($fkIkCtrls[$i]+".FKIKBlend") 0; if ($curFKIKBlend>5 && $curFKIKBlend<10) setAttr ($fkIkCtrls[$i]+".FKIKBlend") 10; if ($curFKIKBlend>5) $ik2fk="IK2FK"; else $ik2fk="FK2IK"; // asSwitchFKIK $fkIkCtrls[$i] `substitute "FKIK" $fkIkCtrl ""` $side $ik2fk; asSwitchFKIK $nameSpace `substitute "FKIK" $fkIkCtrl ""` $side $ik2fk; //global proc asSwitchFKIK (string $nameSpace, string $IK, string $side, string $W2K) } } global proc asAutoSwitchPivot () { string $target,$control,$extraControl; string $sel[]=`ls -sl`; string $tempString[]; if (`asHotKeyCheck "asAutoSwitchPivot"`) return; if (size($sel)!=2) error "Select 1 target object + 1 control"; $target=$sel[0]; $control=$sel[1]; if (!`gmatch $control "*_*"` && `gmatch $target "*_*"`)//selection order was reversed { $target=$sel[1]; $control=$sel[0]; } if (`gmatch $control "*Extra*"`)//extraControl was selected { $tempString=`listRelatives -c -type transform $control`; $control=$tempString[0]; } $tempString=`listRelatives -p $control`; $extraControl=$tempString[0]; if (!`objExists $extraControl`) error ("parent of \""+$control+"\" is not a valid ExtraControl"); float $pos[]=`xform -q -ws -t $control`; float $rot[]=`xform -q -ws -ro $control`; float $extraPos[]=`xform -q -ws -t $extraControl`; float $extraRot[]=`xform -q -ws -ro $extraControl`; float $targetPos[]=`xform -q -ws -t $target`; float $targetRot[]=`xform -q -ws -ro $target`; //print "asAutoSwitchPivot;\n"; int $autoKey=`autoKeyframe -q -st`; if ($autoKey) autoKeyframe -st 0; currentTime (`currentTime -q` -1); setKeyframe ($extraControl+".t") ($extraControl+".r") ($control+".t") ($control+".r"); currentTime (`currentTime -q` +1); xform -ws -t $targetPos[0] $targetPos[1] $targetPos[2] -ro $targetRot[0] $targetRot[1] $targetRot[2] $extraControl; xform -ws -t $pos[0] $pos[1] $pos[2] -ro $rot[0] $rot[1] $rot[2] $control; setKeyframe ($extraControl+".t") ($extraControl+".r") ($control+".t") ($control+".r"); if ($autoKey) autoKeyframe -st 1; select $extraControl; print ("// \""+$extraControl+"\" aligned to \""+$target+"\".\n"); } global proc asQuickIK () { int $otherEndJointAssumed; float $dist; float $posA[],$posB[]; string $startJoint,$endJoint,$ctrlPrefix,$startJointParent,$rotateAxis,$name,$ctrl; string $sel[]=`ls -sl`; string $joints[],$tempString[],$chainJointsReverse[],$chainJoints[],$chainJointNames[]; if (`asHotKeyCheck "asQuickIK"`) return; if (size($sel)!=2) error "Select Start control + End control"; for ($i=0;$i<2;$i++) { $joints[$i]=$sel[$i]; $tempString[0]=`substitute "FK" $joints[$i] ""`;//Fk control if (`objExists $tempString[0]`) { $joints[$i]=$tempString[0]; $ctrlPrefix="FK"; } $tempString[0]=`substitute "_" $joints[$i] "Joint_"`;// Face control e.g tongue if (`objExists $tempString[0]`) { $joints[$i]=$tempString[0]; $ctrlPrefix=""; } } $tempString=`listRelatives -ad -type joint $joints[0]`; if (`stringArrayCount $joints[1] $tempString`) { $startJoint=$joints[0]; $endJoint=$joints[1]; } $tempString=`listRelatives -ad -type joint $joints[1]`; if (`stringArrayCount $joints[0] $tempString`) { $startJoint=$joints[1]; $endJoint=$joints[0]; } if ($startJoint=="" || $endJoint=="") error "Unable to find Start & End joint for the IK, make sure to select 2 control that are in the same hierarchy.\n"; $name=`substituteAllString $startJoint ":" "_"`; $tempString=`listRelatives -p $startJoint`; $startJointParent=$tempString[0]; //if childJoint of $endJoint is a `actual` endJoint, then assume this was meant to be used. $tempString=`listRelatives -ad -type joint $endJoint`; if (size ($tempString)==1) { $endJoint=$tempString[0]; $otherEndJointAssumed=1; } //determine $chainJoints $tempString=`ls -l $endJoint`; tokenize $tempString[0] "|" $tempString; for ($i=size($tempString)-1;$i>-1;$i--) { $chainJointsReverse[size($chainJointsReverse)]=$tempString[$i]; if ($tempString[$i]==$startJoint) break; } for ($i=size($chainJointsReverse)-1;$i>-1;$i--) $chainJoints[size($chainJoints)]=$chainJointsReverse[$i]; for ($i=0;$i0) parent ("QuickIKjoint_"+$chainJointNames[$i]) ("QuickIKjoint_"+$chainJointNames[$i-1]); } parent ("QuickIKjoint_"+$name) ("QuickIK_"+$name+"Group"); parentConstraint -mo $startJointParent ("QuickIKjoint_"+$name); $posA=`xform -q -ws -t $startJoint`; $posB=`xform -q -ws -t $endJoint`; $dist=`mag<<$posA[0]-$posB[0],$posA[1]-$posB[1],$posA[2]-$posB[2]>>`; spaceLocator -n ("QuickIK_"+$name); parent ("QuickIK_"+$name) ("QuickIK_"+$name+"Group"); setAttr ("QuickIK_"+$name+"Shape.overrideEnabled") 1; setAttr ("QuickIK_"+$name+"Shape.overrideColor") 13; setAttr ("QuickIK_"+$name+"Shape.localScale") -type float3 ($dist/2.0) ($dist/2.0) ($dist/2.0); duplicate -n ("QuickPoleVector_"+$name) ("QuickIK_"+$name); setAttr ("QuickPoleVector_"+$name+"Shape.localScale") -type float3 ($dist/4.0) ($dist/4.0) ($dist/4.0); xform -ws -t $posB[0] $posB[1] $posB[2] ("QuickIK_"+$name); ikHandle -n ("QuickIK_"+$name+"Handle") -ns 2 -sol "ikRPsolver" -sj ("QuickIKjoint_"+$chainJointNames[0]) -ee ("QuickIKjoint_"+$chainJointNames[size($chainJointNames)-1]); parent ("QuickIK_"+$name+"Handle") ("QuickIK_"+$name); setAttr ("QuickIK_"+$name+"Handle.v") 0; parent ("QuickPoleVector_"+$name) $startJoint; xform -os -t 0 0 0 -ro 0 0 0 ("QuickPoleVector_"+$name); if ($rotateAxis=="y") setAttr ("QuickPoleVector_"+$name+".tz") $dist; if ($rotateAxis=="z") setAttr ("QuickPoleVector_"+$name+".ty") $dist; //poleVector poleVectorConstraint ("QuickPoleVector_"+$name) ("QuickIK_"+$name+"Handle"); $tempString[0]=`createNode annotationShape`; $tempString=`listRelatives -p $tempString[0]`; rename $tempString[0] ("QuickPoleAnnotation_"+$name); setAttr ("QuickPoleAnnotation_"+$name+"Shape.overrideEnabled") 1; setAttr ("QuickPoleAnnotation_"+$name+"Shape.overrideDisplayType") 2; parent ("QuickPoleAnnotation_"+$name) ("QuickIK_"+$name); xform -os -t 0 0 0 -ro 0 0 0 ("QuickPoleAnnotation_"+$name); connectAttr ("QuickPoleVector_"+$name+"Shape.worldMatrix[0]") ("QuickPoleAnnotation_"+$name+"Shape.dagObjectMatrix[0]"); //move forward to match IkHandle pos setAttr ("QuickPoleVector_"+$name+".tx") `getAttr ("QuickIK_"+$name+".tx")`; //Offsets createNode -n ("QuickIKOffset_"+$name) -p ("QuickIK_"+$name) transform; parent ("QuickIKOffset_"+$name) ("QuickIK_"+$name+"Group"); parent ("QuickIK_"+$name) ("QuickIKOffset_"+$name); createNode -n ("QuickPoleVectorOffset_"+$name) -p ("QuickPoleVector_"+$name) transform; parent ("QuickPoleVectorOffset_"+$name) ("QuickIK_"+$name); parent ("QuickPoleVector_"+$name) ("QuickPoleVectorOffset_"+$name); //connect for ($i=0;$i-2;$b=$b-2) { if ($b==1) {$side="_R";$leftRight="Right";$oppositeSide="_L";} if ($b==-1) {$side="_L";$leftRight="Left";$oppositeSide="_R";} if ($arShapes[$i]=="eyeBlink"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".blink") $v 10; if ($arShapes[$i]=="eyeLookDown"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".ty") $v -1; if ($arShapes[$i]=="eyeLookIn"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".tx") $v (1*$b); if ($arShapes[$i]=="eyeLookOut"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".tx") $v (-1*$b); if ($arShapes[$i]=="eyeLookUp"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".ty") $v 1; if ($arShapes[$i]=="eyeSquint"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".squint") $v 10; if ($arShapes[$i]=="eyeWide"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlEye"+$side+".blink") $v -2; if ($arShapes[$i]=="mouthDimple"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlMouthCorner"+$side+".tx") $v 0.3; if ($arShapes[$i]=="browOuterUp"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlBrow"+$side+".outerUpDown") $v 7.5; if ($arShapes[$i]=="noseSneer"+$leftRight) asDsSdk ($bs+"."+$attr) ($nameSpace+"ctrlNose"+$side+".ty") $v 0.5; //AdvSkel has Center ctrl for these side attrs if ($arShapes[$i]=="mouth"+$leftRight) if (`attributeExists lipSide ctrlMouth_M`)//backwards compataqbility for rigs-2;$b=$b-2) { if ($b==1) {$side="_R";$leftRight="right";$LeftRight="Right";} if ($b==-1) {$side="_L";$leftRight="left";$LeftRight="Left";} setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX."+$leftRight+"EyeTransformRotateY") ($nameSpace+"ctrlEye"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 30 -cd ("MocapX."+$leftRight+"EyeTransformRotateY") ($nameSpace+"ctrlEye"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX."+$leftRight+"EyeTransformRotateX") ($nameSpace+"ctrlEye"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv -30 -cd ("MocapX."+$leftRight+"EyeTransformRotateX") ($nameSpace+"ctrlEye"+$side+".ty"); setAttr ("ctrlEye"+$side+"_translateX.preInfinity") 4; setAttr ("ctrlEye"+$side+"_translateX.postInfinity") 4; setAttr ("ctrlEye"+$side+"_translateY.preInfinity") 4; setAttr ("ctrlEye"+$side+"_translateY.postInfinity") 4; setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.eyeBlink"+$side) ($nameSpace+"ctrlEye"+$side+".blink"); setDrivenKeyframe -itt "linear" -ott "linear" -v 10 -dv 1 -cd ("MocapX.eyeBlink"+$side) ($nameSpace+"ctrlEye"+$side+".blink"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.browInnerUp ($nameSpace+"EyeBrowInner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd MocapX.browInnerUp ($nameSpace+"EyeBrowInner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.browDown"+$side) ($nameSpace+"EyeBrowInner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.5 -dv 1 -cd ("MocapX.browDown"+$side) ($nameSpace+"EyeBrowInner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.browDown"+$side) ($nameSpace+"EyeBrowInner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.5 -dv 1 -cd ("MocapX.browDown"+$side) ($nameSpace+"EyeBrowInner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.browOuterUp"+$side) ($nameSpace+"EyeBrowOuter"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd ("MocapX.browOuterUp"+$side) ($nameSpace+"EyeBrowOuter"+$side+".ty"); if (`attributeExists EyeBrowMid2Joint ($nameSpace+"EyeBrowOuter"+$side)`) setAttr ($nameSpace+"EyeBrowOuter"+$side+".EyeBrowMid2Joint") .75; if (`attributeExists EyeBrowMid1Joint ($nameSpace+"EyeBrowInner"+$side)`) setAttr ($nameSpace+"EyeBrowInner"+$side+".EyeBrowMid1Joint") .75; setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.eyeSquint"+$side) ($nameSpace+"lowerLid"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd ("MocapX.eyeSquint"+$side) ($nameSpace+"lowerLid"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.eyeWide"+$side) ($nameSpace+"ctrlEye"+$side+".blink"); setDrivenKeyframe -itt "linear" -ott "linear" -v -1 -dv 1 -cd ("MocapX.eyeWide"+$side) ($nameSpace+"ctrlEye"+$side+".blink"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.cheekPuff ($nameSpace+"Cheek"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.5 -dv 1 -cd MocapX.cheekPuff ($nameSpace+"Cheek"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.cheekPuff ($nameSpace+"Cheek"+$side+".tz"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd MocapX.cheekPuff ($nameSpace+"Cheek"+$side+".tz"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.cheekSquint"+$side) ($nameSpace+"ctrlEye"+$side+".squint"); setDrivenKeyframe -itt "linear" -ott "linear" -v 3 -dv 1 -cd ("MocapX.cheekSquint"+$side) ($nameSpace+"ctrlEye"+$side+".squint"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.noseSneer"+$side) ($nameSpace+"NoseCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.5 -dv 1 -cd ("MocapX.noseSneer"+$side) ($nameSpace+"NoseCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.noseSneer"+$side) ($nameSpace+"NoseCorner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.2 -dv 1 -cd ("MocapX.noseSneer"+$side) ($nameSpace+"NoseCorner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.noseSneer"+$side) ($nameSpace+"EyeBrowInner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.5 -dv 1 -cd ("MocapX.noseSneer"+$side) ($nameSpace+"EyeBrowInner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.jawForward ($nameSpace+"Jaw_M.tz"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd MocapX.jawForward ($nameSpace+"Jaw_M.tz"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.jawLeft ($nameSpace+"Jaw_M.tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd MocapX.jawLeft ($nameSpace+"Jaw_M.tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.jawRight ($nameSpace+"Jaw_M.tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v -1 -dv 1 -cd MocapX.jawRight ($nameSpace+"Jaw_M.tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouth"+$LeftRight) ($nameSpace+"ctrlMouthCorner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 1 -dv 1 -cd ("MocapX.mouth"+$LeftRight) ($nameSpace+"ctrlMouthCorner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouth"+$LeftRight) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.3 -dv 1 -cd ("MocapX.mouth"+$LeftRight) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); if (`attributeExists ("zipLips"+$side) ($nameSpace+"ctrlMouth_M")`) { setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthClose ($nameSpace+"ctrlMouth_M.zipLips"+$side); setDrivenKeyframe -itt "linear" -ott "linear" -v 10 -dv 1 -cd MocapX.mouthClose ($nameSpace+"ctrlMouth_M.zipLips"+$side); } setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthSmile"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.75 -dv 1 -cd ("MocapX.mouthSmile"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthFrown"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.75 -dv 1 -cd ("MocapX.mouthFrown"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthDimple"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.75 -dv 1 -cd ("MocapX.mouthDimple"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".tx"); if (`objExists ($nameSpace+"upperLipA"+$side)`) //does not exist for Simplified FaceSetup { setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthUpperUp"+$side) ($nameSpace+"upperLipA"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.5 -dv 1 -cd ("MocapX.mouthUpperUp"+$side) ($nameSpace+"upperLipA"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthLowerDown"+$side) ($nameSpace+"lowerLipA"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.5 -dv 1 -cd ("MocapX.mouthLowerDown"+$side) ($nameSpace+"lowerLipA"+$side+".ty"); } setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthUpperUp"+$side) ($nameSpace+"upperLip_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.2 -dv 1 -cd ("MocapX.mouthUpperUp"+$side) ($nameSpace+"upperLip_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthLowerDown"+$side) ($nameSpace+"lowerLip_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.2 -dv 1 -cd ("MocapX.mouthLowerDown"+$side) ($nameSpace+"lowerLip_M.ty"); // setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthPress"+$side) ?; setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd ("MocapX.mouthStretch"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -0.75 -dv 1 -cd ("MocapX.mouthStretch"+$side) ($nameSpace+"ctrlMouthCorner"+$side+".ty"); } //setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthFunnel ?; setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthPucker ($nameSpace+"ctrlMouth_M.tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v -1 -dv 1 -cd MocapX.mouthPucker ($nameSpace+"ctrlMouth_M.tx"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.jawOpen ($nameSpace+"ctrlMouth_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v -2 -dv 1 -cd MocapX.jawOpen ($nameSpace+"ctrlMouth_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthRollUpper ($nameSpace+"ctrlMouth_M.upperRoll"); setDrivenKeyframe -itt "linear" -ott "linear" -v -5 -dv 1 -cd MocapX.mouthRollUpper ($nameSpace+"ctrlMouth_M.upperRoll"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthRollLower ($nameSpace+"ctrlMouth_M.lowerRoll"); setDrivenKeyframe -itt "linear" -ott "linear" -v -5 -dv 1 -cd MocapX.mouthRollLower ($nameSpace+"ctrlMouth_M.lowerRoll"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthShrugUpper ($nameSpace+"upperLip_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.5 -dv 1 -cd MocapX.mouthShrugUpper ($nameSpace+"upperLip_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0 -dv 0 -cd MocapX.mouthShrugLower ($nameSpace+"lowerLip_M.ty"); setDrivenKeyframe -itt "linear" -ott "linear" -v 0.5 -dv 1 -cd MocapX.mouthShrugLower ($nameSpace+"lowerLip_M.ty"); connectAttr MocapX.transformRotateX AdvancedSkeletonHeadOffset.rx; connectAttr MocapX.transformRotateY AdvancedSkeletonHeadOffset.ry; connectAttr MocapX.transformRotateZ AdvancedSkeletonHeadOffset.rz; print ("// MocapX connected.\n"); } global proc asAutoLipSyncDownload (string $uiName) { string $zipFileUrl="https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner/releases/download/v1.1.0-beta.2/montreal-forced-aligner_win64.zip"; if (`about -mac`) $zipFileUrl="https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner/releases/download/v1.1.0-beta.2/montreal-forced-aligner_macosx.zip"; string $libriSpeechLexiconUrl="https://www.openslr.org/resources/11/librispeech-lexicon.txt"; string $sLoc=`asGetScriptLocation`; string $curl=$sLoc+"/AdvancedSkeleton5Files/bin/curl.e"; string $zip=$sLoc+"/AdvancedSkeleton5Files/bin/7za.e"; string $binDir=$sLoc+"/AdvancedSkeleton5Files/bin"; string $downloadDir=$sLoc+"/AdvancedSkeleton5Files/bin/download"; string $tempString[]; tokenize $zipFileUrl "/" $tempString; string $downloadedZipFile=$tempString[size($tempString)-1]; string $downloadedZipFilePath=$downloadDir+"/"+$downloadedZipFile; string $cmd; if (!`file -q -ex $downloadDir`) sysFile -md $downloadDir; //download Montreal-Forced-Aligner if (`about -mac` || `about -linux`) { $cmd="\"curl -L -o "+$downloadDir+"/"+$downloadedZipFile+" "+$zipFileUrl+"\""; evalEcho ("system("+$cmd+")"); } else { $cmd="start\/wait/I \"Downloading\" \""+$curl+"\" -L -o \""+$downloadDir+"/"+$downloadedZipFile+"\" "+$zipFileUrl; print ("// Starting Download:"+$cmd+"\n"); system ($cmd); } //download librispeech-lexicon if (`about -mac` || `about -linux`) { $cmd="\"curl -L -o "+$downloadDir+"/librispeech-lexicon.txt "+$libriSpeechLexiconUrl+"\""; evalEcho ("system("+$cmd+")"); } else { $cmd="start\/wait/I \"Downloading\" \""+$curl+"\" -L -o \""+$downloadDir+"/librispeech-lexicon.txt\" "+$libriSpeechLexiconUrl; print ("// Starting Download:"+$cmd+";\n"); system ($cmd); } //confirm downloads if (`file -q -ex $downloadedZipFilePath`) print ("// Downloaded sucessfully:"+$downloadedZipFilePath+";\n"); else error ("// Download failed, could not find:"+$downloadedZipFilePath+";\n"); if (`file -q -ex ($downloadDir+"/librispeech-lexicon.txt")`) print ("// Downloaded sucessfully:"+$downloadDir+"/librispeech-lexicon.txt;\n"); else error ("// Download failed, could not find:"+$downloadDir+"/librispeech-lexicon.txt;\n"); //unzip if (`about -mac` || `about -linux`) $cmd="unzip "+$downloadedZipFilePath+" -d "+$binDir; else $cmd="start\/wait/I \"Unzipping\" \""+$zip+"\" x \""+$downloadedZipFilePath+"\" -o\""+$binDir+"\""; print ("// Starting Unzip:"+$cmd+";\n"); system($cmd); //confirm unzip if (`file -q -ex ($binDir+"/montreal-forced-aligner")`) print ("// Unzipped sucessfully:"+$downloadedZipFile+";\n"); else error ("// Unzipp failed, could not find:"+$binDir+"/montreal-forced-aligner\n"); //Delete download if (`filetest -f $downloadedZipFilePath`) sysFile -del $downloadedZipFilePath; //Delete montreal-forced-aligner_win64.zip (1kb file that comes with the zip) if (`filetest -f ($binDir+"/montreal-forced-aligner_win64.zip")`) sysFile -del ($binDir+"/montreal-forced-aligner_win64.zip"); //Move librispeech-lexicon.txt sysFile -ren ($binDir+"/montreal-forced-aligner/bin/librispeech-lexicon.txt") ($downloadDir+"/librispeech-lexicon.txt"); asAutoLipSyncUI $uiName; } global proc asAutoLipSyncFfmpegDownload () { //ffmpeg for $segmentReplacing string $zipFileUrl="https://www.advancedskeleton.com/download/div/ffmpeg.7z"; string $ffmpegFile="ffmpeg.e"; if (`about -mac`) { $zipFileUrl="https://www.advancedskeleton.com/download/div/ffmpeg_mac.7z"; $ffmpegFile="ffmpeg"; } string $sLoc=`asGetScriptLocation`; string $curl=$sLoc+"/AdvancedSkeleton5Files/bin/curl.e"; string $zip=$sLoc+"/AdvancedSkeleton5Files/bin/7za.e"; string $forceAlignerBinDir=$sLoc+"/AdvancedSkeleton5Files/bin/montreal-forced-aligner/bin"; string $downloadDir=$sLoc+"/AdvancedSkeleton5Files/bin/download"; string $tempString[]; tokenize $zipFileUrl "/" $tempString; string $downloadedZipFile=$tempString[size($tempString)-1]; string $downloadedZipFilePath=$downloadDir+"/"+$downloadedZipFile; string $cmd; if (!`file -q -ex $downloadDir`) sysFile -md $downloadDir; //download if (`about -mac` || `about -linux`) { $cmd="\"curl -k -o "+$downloadedZipFilePath+" "+$zipFileUrl+"\""; evalEcho ("system("+$cmd+")"); } else { $cmd="start\/wait/I \"Downloading\" \""+$curl+"\" -k -o \""+$downloadedZipFilePath+"\" "+$zipFileUrl; print ("// Starting Download:"+$cmd+";\n"); system ($cmd); } //confirm downloads if (`file -q -ex $downloadedZipFilePath`) print ("// Downloaded sucessfully:"+$downloadedZipFilePath+";\n"); else error ("// Download failed, could not find:"+$downloadedZipFilePath+"\n"); //unzip if (`about -mac` || `about -linux`) $cmd="unzip "+$downloadedZipFilePath+" -d "+$forceAlignerBinDir; else $cmd="start\/wait/I \"Unzipping\" \""+$zip+"\" x \""+$downloadedZipFilePath+"\" -o\""+$forceAlignerBinDir+"\""; print ("// Starting Unzip:"+$cmd+";\n"); system($cmd); //confirm unzip if (`file -q -ex ($forceAlignerBinDir+"/"+$ffmpegFile)`) print ("// Unzipped sucessfully:"+$downloadedZipFile+";\n"); else error ("// Unzipp failed, could not find:"+$forceAlignerBinDir+"/"+$ffmpegFile+"\n"); //Delete download if (`filetest -f $downloadedZipFilePath`) sysFile -del $downloadedZipFilePath; } global proc asAutoLipSyncUI (string $uiName) { asEnsureAsGetScriptLocation; string $nameSpace; string $alignerDir=`asGetScriptLocation`+"/AdvancedSkeleton5Files/bin/montreal-forced-aligner"; string $aligner=$alignerDir+"/bin/mfa_align"; if (`about -win`) $aligner=$alignerDir+"/bin/mfa_align.exe"; int $haveAligner=`file -q -ex $aligner`; string $languages[]=`asAutoLipSyncLanguages`; stringArrayInsertAtIndex 1 $languages "English"; string $language="English"; if (`optionVar -ex asAutoLipSyncLanguage`) $language=`optionVar -q asAutoLipSyncLanguage`; if (`asHotKeyCheck "asAutoLipSyncUI \"\""`) return; if (`window -q -ex asAutoLipSyncUI`) deleteUI asAutoLipSyncUI; window -t AutoLipSync -w 300 -h 200 asAutoLipSyncUI; formLayout asAutoLipSyncUIFormLayout; columnLayout asAutoLipSyncUIColumnLayout; if (!$haveAligner) { separator -h 5 -st none; text -l "To run AutoLipSync,"; text -l "first download \"Montreal-Forced-Aligner\""; separator -h 5 -st none; button -l "Download Montreal-Forced-Aligner" -c ("asAutoLipSyncDownload "+$uiName); showWindow; print ("// Montreal-Forced-Aligner tool must be downloaded first\n"); print ("// If the automatic download does not work, you can manually download from:\n"); print ("// https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner/releases\n"); print ("// download and extract the files, so you get this available file-path:\n"); print ("// "+$aligner+"\n"); print ("\n"); return; } text -m 0 -l $aligner asAutoLipSyncAlignerText; separator -h 10 -st none; columnLayout; text -l "Add Idle motions:"; rowLayout -nc 5; checkBox -l "Blink" -v 1 asAutoLipSyncBlinkCheckBox; checkBox -l "Glimpse" -v 1 asAutoLipSyncGlimpseCheckBox; checkBox -l "EyeBrows" -v 1 asAutoLipSyncEyeBrowsCheckBox; checkBox -l "Head" -v 1 asAutoLipSyncHeadCheckBox; setParent..; setParent..; separator -h 20 -st none; setParent..; scrollField -wordWrap false -text "Dialog text here" asAutoLipSyncUIScrollField; button -m 0 -l "Open text editor, for non-latin alphabet" -c asAutoLipOpenTextEditor asAutoLipSyncUIButton; frameLayout -w 300 -cll 1 -cl 0 -l "advanced options" asAutoLipSyncUIFrameLayout; columnLayout -adj 0; rowLayout -nc 3; optionMenu -l "language:" -cc asAutoLipSyncLanguageChanged asAutoLipSyncLanguageOptionMenu; for ($i=0;$i1) $segmentReplacing=1; float $currentTimeUnitToFPS=`currentTimeUnitToFPS`; if ($currentTimeUnitToFPS<1) $currentTimeUnitToFPS=1; string $nameSpace=`asNameSpaceFromUIName $uiName`; string $mfaDir,$cmd,$genDictCmd,$ffMpegCmd,$pythonCmd,$uniDecoded; string $tempString[]; string $languageMenuValue=`optionMenu -q -v asAutoLipSyncLanguageOptionMenu`; string $language=`tolower $languageMenuValue`; string $aligner=`text -q -l asAutoLipSyncAlignerText`; $mfaDir=`asStripPath $aligner 2`; string $lexicon=$mfaDir+"bin/librispeech-lexicon.txt"; string $ffmpeg=$mfaDir+"bin/ffmpeg.e"; if (`about -mac`) $ffmpeg=$mfaDir+"bin/ffmpeg"; string $mfaGD=$mfaDir+"bin/mfa_generate_dictionary"; string $g2pFile=$mfaDir+"pretrained_models/"+$language+"_g2p.zip"; string $languageZipFile=$mfaDir+"pretrained_models/"+$language+".zip"; string $tempDir=`asGetTempDirectory`+"AdvancedSkeleton/autoLipSync/"; string $audioNode = `timeControl -q -s $gPlayBackSlider`; if (!`objExists $audioNode`) error "No sound found. Make sure to import a sound file first"; string $soundFile=`getAttr ($audioNode+".filename")`; tokenize $soundFile "/" $tempString; string $soundFileBaseName=$tempString[size($tempString)-1]; tokenize $soundFile "." $tempString; string $soundFileExt=$tempString[size($tempString)-1]; string $forceSoundFile=$tempDir+"input/align."+$soundFileExt; string $forceTextFile=$tempDir+"input/align.txt"; string $textGridFile=$tempDir+"output/align.TextGrid"; string $forceText=`scrollField -q -tx asAutoLipSyncUIScrollField`; if (!`objExists ($nameSpace+"FaceControlSet")`) error "No controlSets detected. select a controller"; if (!`objExists ($nameSpace+"ctrlPhonemes_M")`) error ($nameSpace+"ctrlPhonemes_M not found"); //non-english needs to mfa_generate_dictionary (lexicon) first //use the g2p to make the dict, and then the zip (Pretrained acoustic models) to align if ($language!="english") { $lexicon=$tempDir+"sessionLexicon.txt"; if (`about -mac` || `about -linux`) $genDictCmd="\""+$mfaGD+"\" \""+$g2pFile+"\" \""+$tempDir+"input/\" \""+$lexicon+"\""; else $genDictCmd="start\/wait/I \"Generating Dictionary\" \""+$mfaGD+"\" \""+$g2pFile+"\" \""+$tempDir+"input/\" \""+$lexicon+"\""; } if (`about -mac` || `about -linux`) { $cmd="\""+$aligner+"\" -c \""+$tempDir+"input/\" \""+$lexicon+"\" "+$language+" \""+$tempDir+"output/\""; $ffMpegCmd="start\/wait/I \"Coding Audio\" \""+$ffmpeg+"\" -y -i \""+$soundFile+"\""; } else { $cmd="start\/wait/I \"Force Aligning\" \""+$aligner+"\" -c \""+$tempDir+"input/\" \""+$lexicon+"\" "+$language+" \""+$tempDir+"output/\""; $ffMpegCmd="start\/wait/I \"Coding Audio\" \""+$ffmpeg+"\" -y -i \""+$soundFile+"\""; } if (!`file -q -ex $soundFile`) error "Not a valid sound file"; //Remove old results $tempString=`getFileList -fld ($tempDir+"output")`; for ($i=0;$i strip_accents > save file, in Py, so we do not need to pass the text as variable $forceText=`substituteAllString $forceText "`" ""`; $forceText=`substituteAllString $forceText "'" " "`; $forceText=`substituteAllString $forceText "\n" " "`; $pythonCmd+="import unicodedata\n"; $pythonCmd+="def strip_accents(s):\n"; $pythonCmd+=" return ''.join(c for c in unicodedata.normalize('NFD', s)\n"; $pythonCmd+=" if unicodedata.category(c) != 'Mn')\n"; python ($pythonCmd); $uniDecoded=`python ("strip_accents(u'"+$forceText+"')")`; $fileId=`fopen $forceTextFile "w"`; fprint $fileId $uniDecoded; fclose $fileId; if ($uniDecoded!=$forceText) scrollField -e -tx $uniDecoded asAutoLipSyncUIScrollField; } //non-english needs to mfa_generate_dictionary (lexicon) first //use the g2p to make the dict, and then the zip (Pretrained acoustic models) to align if ($language!="english") { print ("// Starting Generating Dictionary:"+$genDictCmd+"\n"); if (`file -q -ex $lexicon`) sysFile -del $lexicon; system ($genDictCmd); if (!`file -q -ex $lexicon`) error ("Failed to create dictionary:\""+$lexicon+"\""); } if ($forceText!="") { print ("// Starting Force Aligning:"+$cmd+"\n"); system ($cmd); } else { $fileId=`fopen $textGridFile "w"`; fprint $fileId ""; fclose $fileId; } if (`file -q -ex $textGridFile`) print ("// Successfully created:\""+$textGridFile+"\".\n"); else { if (`file -q -ex ($tempDir+"output/unaligned.txt")`) { $fileId=`fopen ($tempDir+"output/unaligned.txt") "r"`; $tempString[0]=`fread $fileId $tempString[0]`; print ($tempString[0]+"\n"); fclose $fileId; } //Try with ffmpeg if (!$alwaysReCode) { if (`confirmDialog -title "Confirm" -message "Force Align Failed.\nThis could be a compatibility issues with the sound-file.\nTry to re-code sound-file?" -button "Yes" -button "No" -defaultButton "Yes" -cancelButton "No" -dismissString "No"`=="Yes") { checkBox -e -v 1 asAutoLipSyncAlwaysReCodeCheckBox; asAutoLipSyncForceAlign $nameSpace; return; } } //Try re-download language files, since at some point g2p files was moved to a "1.0" folder https://github.com/MontrealCorpusTools/mfa-models/tree/master/g2p/1.0 if (`confirmDialog -title "Confirm" -message "Force Align Failed.\nThe language files might be incorrect,\nTry to re-download language files?" -button "Yes" -button "No" -defaultButton "Yes" -cancelButton "No" -dismissString "No"`=="Yes") { sysFile -del $languageZipFile; sysFile -del $g2pFile; asAutoLipSyncLanguageChanged; asAutoLipSyncForceAlign $nameSpace; return; } error ("Failed to create:\""+$textGridFile+"\".\n"); } asAutoLipSyncImport $nameSpace; } global proc asAutoLipSyncImport (string $nameSpace) { global string $gMainProgressBar; global string $gPlayBackSlider; global string $gCurrentTimeCmdValueTable[]; int $segmentReplacing=0; float $timeRangeArray[]=`timeControl -q -rangeArray $gPlayBackSlider`; int $nonLatin=`checkBox -q -v asAutoLipSyncNonLatinCheckBox`; int $wordsSection,$phonesSection,$fileId; int $autoBlink=`checkBox -q -v asAutoLipSyncBlinkCheckBox`; int $autoGlimpse=`checkBox -q -v asAutoLipSyncGlimpseCheckBox`; int $autoEyeBrows=`checkBox -q -v asAutoLipSyncEyeBrowsCheckBox`; int $autoHead=`checkBox -q -v asAutoLipSyncHeadCheckBox`; int $lastKeyFrameNr,$nextBlinkTriggFrameNr,$nextGlipseTriggFrameNr,$nextHeadTriggFrameNr,$wordNr; if (!`objExists ($nameSpace+"FKHead_M")`) $autoHead=0; float $prePhoneTime=`floatField -q -v asAutoLipSyncPhonemeInFloatField`; float $postPhoneTime=`floatField -q -v asAutoLipSyncPhonemeOutFloatField`; float $sequenceStart=-1; float $sequenceEnd=-1; float $wordSpace=0.25; float $scale=1.5; float $currentTimeUnitToFPS=`currentTimeUnitToFPS`; if ($currentTimeUnitToFPS<1) $currentTimeUnitToFPS=1; float $xMin,$xMax,$segRepOffset,$keyValue,$previousKeyTime; float $wordStarts[],$wordEnds[],$phoneStarts[],$phoneEnds[],$bb[],$keyTimes[],$pos[],$pos1[],$pos2[]; string $aligner=`text -q -l asAutoLipSyncAlignerText`; string $tempDir=`asGetTempDirectory`+"AdvancedSkeleton/autoLipSync/"; string $textGridFile=$tempDir+"output/align.TextGrid"; string $nextLine,$para,$value,$imConvertCmd,$pythonCmd,$fileRead,$font; string $tempString[],$words[],$phones[],$missingPhoneParts[],$letters[],$deleteObjs[],$texts[],$chars[]; string $currentTimeUnit=`currentUnit -q -t`; string $audioNode = `timeControl -q -s $gPlayBackSlider`; string $languageMenuValue=`optionMenu -q -v asAutoLipSyncLanguageOptionMenu`; string $language=`tolower $languageMenuValue`; float $offset=`getAttr ($audioNode+".offset")`/$currentTimeUnitToFPS; if (!`objExists ($nameSpace+"ctrlPhonemes_M")`) error ($nameSpace+"ctrlPhonemes_M not found"); if (`objExists ($nameSpace+"FaceFitSkeletonHeightShape")`) { $pos1=`xform -q -ws -t ($nameSpace+"FaceFitSkeletonHeightShape.cv[5]")`; $pos2=`xform -q -ws -t ($nameSpace+"FaceFitSkeletonShape.cv[5]")`; $scale=$pos1[1]-$pos2[1]; } if (($timeRangeArray[1]-$timeRangeArray[0])>1 && `objExists ($nameSpace+"subTitles")`) $segmentReplacing=1; if ($segmentReplacing) { //Remove all subtitles in segment (and onwards select -cl; $pos=`xform -q -ws -t ($nameSpace+"subTitlesArrowShape.cv[3]")`; $texts=`listRelatives -c ($nameSpace+"subTitlesRoller")`; currentTime $timeRangeArray[0]; $previousKeyTime=`findKeyframe -which previous ($nameSpace+"subTitlesRoller.tx")`; for ($i=0;$i0) { $line=`strip $nextLine`; tokenize $line " = " $tempString; $para=$tempString[0]; $value=$tempString[1]; if ($sequenceStart==-1 && $para=="xmin") $sequenceStart=$value; if ($sequenceEnd==-1 && $para=="xmax") $sequenceEnd=$value; if ($para=="name" && $value=="\"words\"") $wordsSection=1; if ($para=="name" && $value=="\"phones\"") {$phonesSection=1;$wordsSection=0;} if ($para=="xmin") $xMin=$value; if ($para=="xmax") $xMax=$value; if ($wordsSection && $para=="text") { $tempString[0]=`substituteAllString $value "\"" ""`; if ($tempString[0]!="") { $words[size($words)]=$tempString[0]; $wordStarts[size($wordStarts)]=$xMin+$segRepOffset+$offset; $wordEnds[size($wordEnds)]=$xMax+$segRepOffset+$offset; } } if ($phonesSection && $para=="text") { $tempString[0]=`substituteAllString $value "\"" ""`; if ($tempString[0]!="") { $phones[size($phones)]=$tempString[0]; $phoneStarts[size($phoneStarts)]=$xMin+$segRepOffset+$offset; $phoneEnds[size($phoneEnds)]=$xMax+$segRepOffset+$offset; } } $nextLine=`fgetline $fileId`; } fclose $fileId; for ($i=0;$i") $words[$i]="***"; if (!$segmentReplacing) playbackOptions -min ($sequenceStart+$offset) -ast ($sequenceStart+$offset) -aet ($sequenceEnd+$offset) -max ($sequenceEnd+$offset); //ensure key of value 0 at frame 0 setKeyframe -itt linear -ott linear -t 0 -v 0 ($nameSpace+"subTitlesRoller.tx"); for ($i=0;$i<9999;$i++) if (!`objExists ($nameSpace+"text"+$i)`) break; $wordNr=$i; //render non supported symbols, from utf-8 format text files if ($nonLatin) { if (!`file -q -ex ($tempDir+"render")`) sysFile -md ($tempDir+"render"); $pythonCmd=""; $pythonCmd+="wordsSection = 0\n"; $pythonCmd+="wordNr = "+$wordNr+"\n"; $pythonCmd+="searchfile = open('"+$textGridFile+"','r')\n"; $pythonCmd+="for line in searchfile:\n"; $pythonCmd+=" if line.find('name = \"words\"') != -1:\n"; $pythonCmd+=" wordsSection = 1\n"; $pythonCmd+=" if line.find('name = \"phones\"') != -1:\n"; $pythonCmd+=" wordsSection = 0\n"; $pythonCmd+=" if wordsSection == 1:\n"; $pythonCmd+=" if line.find('text = ') != -1:\n"; $pythonCmd+=" word = line.split()[2].replace('\"','')\n"; $pythonCmd+=" if word == '':\n"; $pythonCmd+=" continue\n"; $pythonCmd+=" wordFile = open ('"+$tempDir+"render/word'+str(wordNr)+'.txt','w')\n"; $pythonCmd+=" wordFile.write (word)\n"; $pythonCmd+=" wordFile.close ()\n"; $pythonCmd+=" wordNr = wordNr + 1\n"; $pythonCmd+="searchfile.close()\n"; python ($pythonCmd); } evalDeferred ("progressBar -e -ep "+$gMainProgressBar); progressBar -e -st "Reading Data" -bp -ii 1 -min 0 -max (size($words)+1) $gMainProgressBar; for ($i=0;$i0) { $line=`strip $nextLine`; tokenize $line "=" $tempString; $para=$tempString[0]; $value=$tempString[1]; if ($para=="sideRight") textFieldGrp -e -tx $value asMappingUISideRightTextFieldGrp; if ($para=="sideLeft") textFieldGrp -e -tx $value asMappingUISideLeftTextFieldGrp; if ($para=="sideMiddle") textFieldGrp -e -tx $value asMappingUISideMiddleTextFieldGrp; if ($para=="sideBeforeName") eval ("checkBox -e -v "+$value+" asMappingUISideBeforeNameCheckBox"); if ($para=="sideUnderScore") eval ("checkBox -e -v "+$value+" asMappingUISideUnderScoreCheckBox"); if ($section==2) { if ($para=="") { $nextLine=`fgetline $fileId`; continue; } asMappingUIAddJoint; textField -e -tx $para ("asMappingUIJointsTextFieldA"+$nr); textField -e -tx $value ("asMappingUIJointsTextFieldB"+$nr); $nr++; } if ($para=="" && $value=="") $section++; $nextLine=`fgetline $fileId`; } fclose $fileId; asMappingUISideOptionChanged; } global proc asMappingUIExport (string $tool) { string $fDet,$a,$b; string $asScriptLocation=`asGetScriptLocationFromSelector`; string $tempString[],$existingMenuItems[],$existingFiles[]; string $return[] = `fileDialog2 -fileFilter "*.txt" -dialogStyle 2 -dir ($asScriptLocation+"/AdvancedSkeleton5Files/"+$tool+"s/")`; string $file=$return[0]; if ($file=="") return; $fDet+="sideRight="+`textFieldGrp -q -tx asMappingUISideRightTextFieldGrp`+"\n"; $fDet+="sideLeft="+`textFieldGrp -q -tx asMappingUISideLeftTextFieldGrp`+"\n"; $fDet+="sideMiddle="+`textFieldGrp -q -tx asMappingUISideMiddleTextFieldGrp`+"\n"; $fDet+="sideBeforeName="+`checkBox -q -v asMappingUISideBeforeNameCheckBox`+"\n"; $fDet+="sideUnderScore="+`checkBox -q -v asMappingUISideUnderScoreCheckBox`+"\n"; $fDet+="\n"; for ($nr=1;$nr<999;$nr++) { if (!`rowLayout -q -ex ("asMappingUIJointsRowLayout"+$nr)`) break; $a=`textField -q -tx ("asMappingUIJointsTextFieldA"+$nr)`; $b=`textField -q -tx ("asMappingUIJointsTextFieldB"+$nr)`; $fDet+=$a+"="+$b+"\n"; } int $fileId=`fopen $file "w"`; fprint $fileId $fDet; fclose $fileId; tokenize $return[0] "/" $tempString; tokenize $tempString[size($tempString)-1] "." $tempString; $existingMenuItems=`optionMenu -q -ill asMappingUIFiles`; for ($i=0;$i1) { warning "Found multiple objects called \"hip\", this is probably a export from DAZ, now attemting to merge all the DAZ skeletons.."; for ($i=0;$i$maxNumChildJoints) { $longHipToKeep=$tempString[$i]; $maxNumChildJoints=$numChilJoints; } } } //rename to unique names for ($i=0;$i0.001 || $pos[0]<-0.001) $isMiddleJoint=0; //find $bResolved $underS=""; if ($sideUnderScore) $underS="_"; if ($isMiddleJoint && $sideMiddle=="")//special case, no middleSuffix, so no underscore $underS=""; if ($sideBeforeName) { if ($isMiddleJoint) $bResolved=$sideMiddle+$underS+$b; else $bResolved=$sideRight+$underS+$b; } else { if ($isMiddleJoint) $bResolved=$b+$underS+$sideMiddle; else $bResolved=$b+$underS+$sideRight; } if ($nameSpaceB!="") $bResolved=$nameSpaceB+":"+$bResolved; if (!`objExists $bResolved`) { warning ("Other Joint \""+$bResolved+"\" not found"); textField -e -bgc 1.0 0.5 0.5 ("asMappingUIJointsTextFieldB"+$nr); $numMissing++; continue; } else textField -e -bgc $bgc[0] $bgc[1] $bgc[2] ("asMappingUIJointsTextFieldB"+$nr); $pos=`xform -q -ws -t $bResolved`; xform -ws -t $pos[0] $pos[1] $pos[2] $aLong; } if ($numMissing) frameLayout -e -cl 1 -bgc 1.0 0.5 0.5 asMappingUIJointsFrameLayout; else frameLayout -e -bgc $bgc2[0] $bgc2[1] $bgc2[2] asMappingUIJointsFrameLayout; asFitModeManualUpdate; //special case, MetaHuman have no fingerEndJoints if ($file=="MetaHuman") { setAttr ThumbFinger3.jo -type float3 0 0 0; setAttr IndexFinger3.jo -type float3 0 0 0; setAttr MiddleFinger3.jo -type float3 0 0 0; setAttr RingFinger3.jo -type float3 0 0 0; setAttr PinkyFinger3.jo -type float3 0 0 0; } select FitSkeleton; } global proc asMappingUIFunction (string $function) { int $sideBeforeName=`checkBox -q -v asMappingUISideBeforeNameCheckBox`; int $sideUnderScore=`checkBox -q -v asMappingUISideUnderScoreCheckBox`; int $numChar,$numChar2,$numConnectedJoints; float $height=10; if (`objExists "Main"`) $height=`getAttr "Main.height"`; string $fk="FK"; if (`checkBox -q -ex asMappingUIFKExtraCheckBox`) if (`checkBox -q -v asMappingUIFKExtraCheckBox`) $fk="FKExtra"; string $target,$source,$dest; string $underS=""; string $sideRight=`textFieldGrp -q -tx asMappingUISideRightTextFieldGrp`; string $sideLeft=`textFieldGrp -q -tx asMappingUISideLeftTextFieldGrp`; string $sideMiddle=`textFieldGrp -q -tx asMappingUISideMiddleTextFieldGrp`; string $nameSpaceA=`textField -q -tx asMappingUINameSpacesTextFieldA1`; string $nameSpaceB=`textField -q -tx asMappingUINameSpacesTextFieldB1`; string $tempString[],$as[],$bs[]; string $deformJoints[]=`listRelatives -type joint -ad ($nameSpaceA+"DeformationSystem")`; if ($function=="MoCapConnect" && `objExists MoCapConstraints`) error "MoCapConstraints object already exists, which means MoCap skeleton is already connected"; for ($nr=1;$nr<999;$nr++) { if (!`rowLayout -q -ex ("asMappingUIJointsRowLayout"+$nr)`) break; $as[$nr-1]=`textField -q -tx ("asMappingUIJointsTextFieldA"+$nr)`; $bs[$nr-1]=`textField -q -tx ("asMappingUIJointsTextFieldB"+$nr)`; } for ($i=0;$i "+$target+"\n"); select $target; if (`objExists ($target+"_parentConstraint1")`) delete ($target+"_parentConstraint1"); if (`objExists ($target+"_scaleConstraint1")`) delete ($target+"_scaleConstraint1"); parentConstraint -mo $deformJoints[$i] $target; scaleConstraint $deformJoints[$i] $target; } //MoCapConnect if ($function=="MoCapConnect") { if ($nameSpaceA!="") $dest=`substitute $nameSpaceA $deformJoints[$i] ($nameSpaceA+$fk)`; else $dest=$fk+$deformJoints[$i]; if (`gmatch $dest "*Root_M"`) {//Use RootX instead of Root, as Root may have `inbetween` joint $dest=`substitute "FKRoot_M" $dest "RootX_M"`; if ($fk=="FKExtra") $dest=`substitute "FKExtraRoot_M" $dest "RootExtraX_M"`; } if (!`objExists $dest`) continue; if (!`objExists $target`) { if (!`objExists MoCapConstraints`) error ("Unable to find \""+$target+"\", Maybe the NameSpace is not defined ?\n"); else { print ("\""+$target+"\" not found, Skipping.\n"); continue; } } print ($target+" -> "+$dest+"\n"); //if MoCap-joint-name clashes with FitSkeleton-joint-name (e.g Head, Neck) //we will update $target to have `fullPath` $tempString=`ls -l $target`; if (size($tempString)>1) { for ($y=0;$y "+$dest+"\n"); } if (!`objExists MoCapConstraints`) { createNode -n MoCapConstraints transform; asLockAttr MoCapConstraints 1 1 1 1; } if (!`attributeExists disableConstraints MoCapConstraints`) addAttr -k 1 -ln "disableConstraints" -at bool MoCapConstraints; if ($deformJoints[$i]==$nameSpaceA+"Root_M") { $tempString=`pointConstraint -mo $target $dest`; // parent $tempString[0] MoCapConstraints; connectAttr MoCapConstraints.disableConstraints ($tempString[0]+".nodeState"); } $tempString=`orientConstraint -mo $target $dest`; // parent $tempString[0] MoCapConstraints; connectAttr MoCapConstraints.disableConstraints ($tempString[0]+".nodeState"); $numConnectedJoints++; } //MoCapZeroOut if ($function=="MoCapZeroOut") { if (!`objExists $target`) continue; catchQuiet (`setAttr ($target+".r") -type float3 0 0 0`); $numConnectedJoints++; } } //blendShapes if ($function=="CreateBSControl") { $tempString=`ls -type blendShape`; for ($i=0;$i1) $nameSpace=$tempString[0]; } print ("// nameSpace \""+$nameSpace+"\" detected, and updated in the \"NameSpaces\" section.\n"); textField -e -tx $nameSpace asMappingUINameSpacesTextFieldB1; } global proc asMoCapMatcherScan () { asMoCapMatcherNameSpaceDetect; } global proc asMoCapMatcherDisconnect () { string $tempString[]; if (`objExists MoCapConstraints`) { if (`attributeExists disableConstraints MoCapConstraints`) $tempString=`listConnections -s 0 -d 1 MoCapConstraints.disableConstraints`; for ($i=0;$i0) { $line=`strip $nextLine`; tokenize $line $tempString; if (`gmatch $line "Subject #*"`) $subjects[size($subjects)]=$line; $nextLine=`fgetline $fileId`; } fclose $fileId; setParent -menu asMCLCNU1OptionMenu; for ($i=0;$i0) { $line=`strip $nextLine`; tokenize $line $tempString; if (`gmatch $line "Subject #*"`) { if ($line==$subject) $subjectMatch=1; else $subjectMatch=0; } if ($subjectMatch && `gmatch $line "[0-9][0-9]*"`) $clips[size($clips)]=$line; $nextLine=`fgetline $fileId`; } fclose $fileId; setParent -menu asMCLCNU2OptionMenu; for ($i=0;$i-2;$b=$b-2) { if ($b==1) {$side="_R";$rightLeft="Right";$rotA[0]=0;$rotA[1]=0;$rotA[2]=180;$rotB[0]=90;$rotB[1]=0;$rotB[2]=180;} if ($b==-1) {$side="_L";$rightLeft="Left";$rotA[0]=0;$rotA[1]=0;$rotA[2]=0;$rotB[0]=-90;$rotB[1]=0;$rotB[2]=180;} xform -ws -ro $rotA[0] $rotA[1] $rotA[2] ($moCapNs+":"+$rightLeft+"Arm"); xform -ws -ro $rotA[0] $rotA[1] $rotA[2] ($moCapNs+":"+$rightLeft+"Hand"); if (`objExists ("FKShoulder"+$side)`) asSetWSOrient $rotB[0] $rotB[1] $rotB[2] ("FKShoulder"+$side); if (`objExists ("FKWrist"+$side)`) asSetWSOrient $rotB[0] $rotB[1] $rotB[2] ("FKWrist"+$side); } $constraintObjs={"RootX_M","FKRoot_M","FKSpine1_M","FKChest_M","FKNeck_M","FKHead_M"}; $constraintToObjs={"Hips","Spine","Spine1","Spine3","Neck","Head"}; for ($b=1;$b>-2;$b=$b-2) { if ($b==1) {$side="_R";$rightLeft="Right";} if ($b==-1) {$side="_L";$rightLeft="Left";} $tempString={("IKLeg"+$side),("IKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; $constraintObjs=`stringArrayCatenate $tempString $constraintObjs`; $tempString={($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; $constraintToObjs=`stringArrayCatenate $tempString $constraintToObjs`; } for ($i=0;$i-2;$b=$b-2) { if ($b==1) {$side="_R";$rightLeft="Right";} if ($b==-1) {$side="_L";$rightLeft="Left";} for ($y=0;$y-2;$b=$b-2) { if ($b==1) {$side="_R";$rightLeft="Right";} if ($b==-1) {$side="_L";$rightLeft="Left";} // $tempString={("IKLeg"+$side),("IKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; // $tempString={("FKHip"+$side),("FKKnee"+$side),("FKAnkle"+$side),("FKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; $tempString={("IKLeg"+$side),("IKToes"+$side),("FKHip"+$side),("FKKnee"+$side),("FKAnkle"+$side),("FKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; $constraintObjs=`stringArrayCatenate $tempString $constraintObjs`; // $tempString={($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; // $tempString={($rightLeft+"UpLeg"),($rightLeft+"Leg"),($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; $tempString={($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"UpLeg"),($rightLeft+"Leg"),($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; $constraintToObjs=`stringArrayCatenate $tempString $constraintToObjs`; } for ($i=0;$i-2;$b=$b-2) { if ($b==1) {$side="_R";$rightLeft="Right";} if ($b==-1) {$side="_L";$rightLeft="Left";} // $tempString={("IKLeg"+$side),("IKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; // $tempString={("FKHip"+$side),("FKKnee"+$side),("FKAnkle"+$side),("FKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; $tempString={("IKLeg"+$side),("IKToes"+$side),("FKHip"+$side),("FKKnee"+$side),("FKAnkle"+$side),("FKToes"+$side),("FKScapula"+$side),("FKShoulder"+$side),("FKElbow"+$side),("FKWrist"+$side)}; $constraintObjs=`stringArrayCatenate $tempString $constraintObjs`; // $tempString={($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; // $tempString={($rightLeft+"UpLeg"),($rightLeft+"Leg"),($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; $tempString={($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"UpLeg"),($rightLeft+"Leg"),($rightLeft+"Foot"),($rightLeft+"ToeBase"),($rightLeft+"Shoulder"),($rightLeft+"Arm"),($rightLeft+"ForeArm"),($rightLeft+"Hand")}; $constraintToObjs=`stringArrayCatenate $tempString $constraintToObjs`; } for ($i=0;$i "+$driven+" ("+$drivenValue+")\n"); setDrivenKeyframe -itt "linear" -ott "linear" -dv 0 -v 0 -cd $driver $driven; setDrivenKeyframe -itt "linear" -ott "linear" -dv $driverValue -v $drivenValue -cd $driver $driven; //pre post infinity string $nodes[]=`listConnections -s 1 -d 0 -scn 1 $driven`; for ($i=0;$i