//WorkWindow Creating $winMain = "winMain"; if (`window -exists $winMain`) { deleteUI $winMain; } window -t "Arsenium Face Control" -wh 200 300 $winMain; columnLayout winTop; frameLayout -labelVisible false -bs "etchedIn" -marginWidth 5 - marginHeight 5 frWinTop; columnLayout winInTop; rowColumnLayout -numberOfColumns 2 -columnWidth 1 100 -columnWidth 2 100; text -al "center" -fn "boldLabelFont" "Options"; text -al "center" -fn "boldLabelFont" "Current Time"; button -l "Control Workspace" -command "wrkSpace"; button -l "Key All" -command "keyAll"; button -l "Reset Face" -command "butReset"; button -l "Select All" -command "select -r Cheek_L Cheek_R EyeBrows ForeHead Hear_L Hear_R In_Leeps Jaw JawNeck Leeps NeckApple Nose Out_Leeps Tonque;"; button -l "Delete All Keys" -bgc 0.7 0.7 0.7 -command "delAllKeys"; button -l "Cut Keys" -command "cutCurKeys"; text -al "center" -fn "boldLabelFont" "Phonem"; text -al "center" -fn "boldLabelFont" "Emotion"; button -l "Ah" -command "phonemAh"; button -l "Angry" -command "angryFace"; button -l "Ee" -command "phonemEe"; button -l "Surprise" -command "surpriseFace"; button -l "Oh" -command "phonemOh"; button -l "Melancholy" -command "melancholyFace"; button -l "Oo, Whistle" -command "phonemOo"; button -l "Sad" -command "sadFace"; button -l "B,P,M" -command "phonemB"; button -l "Smile Closed" -command "smileClFace"; button -l "L" -command "phonemL"; button -l "Open Smile" -command "smileOpFace"; button -l "D,T" -command "phonemT"; button -l "Fear"; button -l "Th" -command "phonemTh"; button -l "Strange"; setParent "winTop"; columnLayout winBot; frameLayout -labelVisible false -bs "etchedOut" -marginWidth 5 - marginHeight 5 frWinBot; columnLayout winInBot; rowColumnLayout -numberOfColumns 1 -columnWidth 1 200; text -al "center" "Arsenium Face Control, ver.1.19, MEL"; text -al "center" "script by I.Levodeanschi, ilee@adv.md,©"; setParent "winBot"; showWindow winMain; //Cut All Current Keys proc cutCurKeys() { // select -r Cheek_L Cheek_R EyeBrows ForeHead Hear_L Hear_R In_Leeps Jaw JawNeck Leeps NeckApple Nose Out_Leeps Tonque; // cutKey -t `currentTime -query`; cutKey -t `currentTime -query` Cheek_L.w; cutKey -t `currentTime -query` Cheek_R.w; cutKey -t `currentTime -query` EyeBrows.w; cutKey -t `currentTime -query` ForeHead.w; cutKey -t `currentTime -query` Hear_L.w; cutKey -t `currentTime -query` Hear_R.w; cutKey -t `currentTime -query` In_Leeps.w; cutKey -t `currentTime -query` Jaw.w; cutKey -t `currentTime -query` JawNeck.w; cutKey -t `currentTime -query` Leeps.w; cutKey -t `currentTime -query` NeckApple.w; cutKey -t `currentTime -query` Nose.w; cutKey -t `currentTime -query` Out_Leeps.w; cutKey -t `currentTime -query` Tonque.w; } //Delete All Keys proc delAllKeys() { cutKey Cheek_L.w; cutKey Cheek_R.w; cutKey EyeBrows.w; cutKey ForeHead.w; cutKey Hear_L.w; cutKey Hear_R.w; cutKey In_Leeps.w; cutKey Jaw.w; cutKey JawNeck.w; cutKey Leeps.w; cutKey NeckApple.w; cutKey Nose.w; cutKey Out_Leeps.w; cutKey Tonque.w; } //Workspace proc wrkSpace() { setNamedPanelLayout "Four View"; updateToolbox(); findNewCurrentModelView; outlinerPanel -e -rp modelPanel1 outlinerPanel1; scriptedPanel -e -rp modelPanel2 graphEditor1; lookThroughModelPanel persp modelPanel3; blendShapePanel -e -rp modelPanel4 blendShapePanel1; } //Reset proc butReset() { global string $wt; string $wts[]=`listAttr -m Cheek_L.w`;for ($wt in $wts) catch(eval("setAttr (\"Cheek_L.\"+$wt) 0")); string $wts[]=`listAttr -m Cheek_R.w`;for ($wt in $wts) catch(eval("setAttr (\"Cheek_R.\"+$wt) 0")); string $wts[]=`listAttr -m EyeBrows.w`;for ($wt in $wts) catch(eval("setAttr (\"EyeBrows.\"+$wt) 0")); string $wts[]=`listAttr -m ForeHead.w`;for ($wt in $wts) catch(eval("setAttr (\"ForeHead.\"+$wt) 0")); string $wts[]=`listAttr -m Hear_L.w`;for ($wt in $wts) catch(eval("setAttr (\"Hear_L.\"+$wt) 0")); string $wts[]=`listAttr -m Hear_R.w`;for ($wt in $wts) catch(eval("setAttr (\"Hear_R.\"+$wt) 0")); string $wts[]=`listAttr -m In_Leeps.w`;for ($wt in $wts) catch(eval("setAttr (\"In_Leeps.\"+$wt) 0")); string $wts[]=`listAttr -m Jaw.w`;for ($wt in $wts) catch(eval("setAttr (\"Jaw.\"+$wt) 0")); string $wts[]=`listAttr -m JawNeck.w`;for ($wt in $wts) catch(eval("setAttr (\"JawNeck.\"+$wt) 0")); string $wts[]=`listAttr -m Leeps.w`;for ($wt in $wts) catch(eval("setAttr (\"Leeps.\"+$wt) 0")); string $wts[]=`listAttr -m NeckApple.w`;for ($wt in $wts) catch(eval("setAttr (\"NeckApple.\"+$wt) 0")); string $wts[]=`listAttr -m Nose.w`;for ($wt in $wts) catch(eval("setAttr (\"Nose.\"+$wt) 0")); string $wts[]=`listAttr -m Out_Leeps.w`;for ($wt in $wts) catch(eval("setAttr (\"Out_Leeps.\"+$wt) 0")); string $wts[]=`listAttr -m Tonque.w`;for ($wt in $wts) catch(eval("setAttr (\"Tonque.\"+$wt) 0")); } //Melancholy proc melancholyFace() { butReset; setAttr "EyeBrows.Roof" 1; setAttr "In_Leeps.in_Melan" 1; setAttr "JawNeck.jn_Melan" 1; setAttr "Leeps.l_Melan" 1; setAttr "Nose.nose_Melan" 1; setAttr "Out_Leeps.out_Melan" 1; } //Sad proc sadFace() { butReset; setAttr "EyeBrows.eyes_Sad" 1; setAttr "ForeHead.fh_Sad" 1; setAttr "ForeHead.fh_Sad" 0; setAttr "Hear_L.hL_Sad" 1; setAttr "Hear_R.hR_Sad" 1; setAttr "In_Leeps.in_Sad" 1; setAttr "Jaw.jaw_Sad" 1; setAttr "JawNeck.jn_Sad" 1; setAttr "Leeps.l_Sad" 1; setAttr "Nose.nose_Sad" 1; setAttr "Out_Leeps.out_Sad" 1; } //SmileClosed proc smileClFace() { butReset; setAttr "In_Leeps.in_SmileCl" 1; setAttr "Jaw.jaw_SmileCl" 1; setAttr "JawNeck.jn_SmileCl" 1; setAttr "Leeps.l_SmileCl" 1; setAttr "Out_Leeps.out_SmileCl" 1; } //SmileOpened proc smileOpFace() { butReset; setAttr "Cheek_L.chL_SmileOp" 1; setAttr "Cheek_R.chR_SmileOp" 1; setAttr "In_Leeps.in_SmileOp" 1; setAttr "Jaw.jaw_SmileOp" 1; setAttr "JawNeck.jn_SmileOp" 1; setAttr "Leeps.l_SmileOp" 1; setAttr "Out_Leeps.out_SmileOp" 1; } //Phonem Ah proc phonemAh() { butReset; //setAttr "Cheek_L.chL_Ah" 1; //setAttr "Cheek_R.chR_Ah" 1; setAttr "In_Leeps.in_Ah" 1; setAttr "Jaw.jaw_Ah" 1; setAttr "JawNeck.jn_Ah" 1; setAttr "Leeps.l_Ah" 1; setAttr "NeckApple.ap_Ah" 1; //setAttr "Nose.nose_Ah" 1; setAttr "Out_Leeps.out_Ah" 1; setAttr "Tonque.tonq_Ah" 1; } //Phonem B proc phonemB() { butReset; //setAttr "Cheek_L.chL_B" 1; //setAttr "Cheek_R.chR_B" 1; setAttr "In_Leeps.in_B" 1; setAttr "Jaw.jaw_B" 1; setAttr "JawNeck.jn_B" 1; setAttr "Leeps.l_B" 1; setAttr "NeckApple.ap_B" 1; //setAttr "Nose.nose_B" 1; setAttr "Out_Leeps.out_B" 1; setAttr "Tonque.tonq_B" 1; } //Angry proc angryFace() { butReset; setAttr "Cheek_L.chL_B" 1; setAttr "Cheek_R.chR_B" 1; setAttr "In_Leeps.in_B" 1; setAttr "Jaw.jaw_B" 1; setAttr "JawNeck.jn_B" 1; setAttr "Leeps.l_B" 1; setAttr "NeckApple.ap_B" 1; setAttr "Nose.nose_B" 1; setAttr "Out_Leeps.out_B" 1; setAttr "Tonque.tonq_B" 1; setAttr "EyeBrows.Angry" 0.40862; setAttr "EyeBrows.eyebR_Dn" 0.5484; setAttr "EyeBrows.eyebL_Dn" 0.50538; } //Phonem T proc phonemT() { butReset; //setAttr "Cheek_L.chL_T" 1; //setAttr "Cheek_R.chR_T" 1; setAttr "In_Leeps.in_T" 1; setAttr "Jaw.jaw_T" 1; setAttr "JawNeck.jn_T" 1; setAttr "Leeps.l_T" 1; setAttr "NeckApple.ap_T" 1; //setAttr "Nose.nose_T" 1; setAttr "Out_Leeps.out_T" 1; setAttr "Tonque.tonq_T" 1; } //Phonem Th proc phonemTh() { butReset; setAttr "In_Leeps.in_Th" 1; setAttr "Jaw.jaw_Th" 1; setAttr "Leeps.l_Th" 1; setAttr "Out_Leeps.out_Th" 1; setAttr "Tonque.tonq_Th" 1; } //Phonem Ee proc phonemEe() { butReset; //setAttr "Cheek_L.chL_Ee" 1; //setAttr "Cheek_R.chR_Ee" 1; setAttr "In_Leeps.in_Ee" 1; setAttr "Jaw.jaw_Ee" 1; setAttr "JawNeck.jn_Ee" 1; setAttr "Leeps.l_Ee" 1; setAttr "NeckApple.ap_Ee" 1; //setAttr "Nose.nose_Ee" 1; setAttr "Out_Leeps.out_Ee" 1; setAttr "Tonque.tonq_Ee" 1; } //Phonem L proc phonemL() { butReset; //setAttr "Nose.nose_L" 1; setAttr "Out_Leeps.out_L" 1; setAttr "Tonque.tonq_L" 1; setAttr "NeckApple.ap_L" 1; setAttr "Leeps.l_L" 1; setAttr "JawNeck.jn_L" 1; setAttr "Jaw.jaw_L" 1; setAttr "In_Leeps.in_L" 1; //setAttr "Cheek_R.chR_L" 1; //setAttr "Cheek_L.chL_L" 1; } //Phonem Oh proc phonemOh() { butReset; setAttr "Tonque.tonq_Oh" 1; setAttr "Out_Leeps.out_Oh" 1; //setAttr "Nose.nose_Oh" 1; setAttr "NeckApple.ap_Oh" 1; setAttr "Leeps.l_Oh" 1; setAttr "JawNeck.jn_Oh" 1; setAttr "Jaw.jaw_Oh" 1; setAttr "In_Leeps.in_Oh" 1; //setAttr "Cheek_R.chR_Oh" 1; //setAttr "Cheek_L.chL_Oh" 1; } //Surprise proc surpriseFace() { butReset; setAttr "EyeBrows.Surprise" 1; setAttr "Tonque.tonq_Oh" 1; setAttr "Out_Leeps.out_Oh" 1; setAttr "Nose.nose_Oh" 1; setAttr "NeckApple.ap_Oh" 1; setAttr "Leeps.l_Oh" 1; setAttr "JawNeck.jn_Oh" 1; setAttr "Jaw.jaw_Oh" 1; setAttr "In_Leeps.in_Oh" 1; setAttr "Cheek_R.chR_Oh" 1; setAttr "Cheek_L.chL_Oh" 1; } //Phonem Oo proc phonemOo() { butReset; //setAttr "Cheek_L.chL_Oo" 1; //setAttr "Cheek_R.chR_Oo" 1; setAttr "In_Leeps.In_Oo" 1; setAttr "Jaw.jaw_Oo" 1; setAttr "JawNeck.jn_Oo" 1; setAttr "Leeps.l_Oo" 1; setAttr "NeckApple.ap_Oo" 1; //setAttr "Nose.nose_Oo" 1; setAttr "Out_Leeps.out_Oo" 1; setAttr "Tonque.tonqOo" 1; } //Key All proc keyAll() { setKeyframe Cheek_L.w; setKeyframe Cheek_R.w; setKeyframe EyeBrows.w; setKeyframe ForeHead.w; setKeyframe Hear_L.w; setKeyframe Hear_R.w; setKeyframe In_Leeps.w; setKeyframe Jaw.w; setKeyframe JawNeck.w; setKeyframe Leeps.w; setKeyframe NeckApple.w; setKeyframe Nose.w; setKeyframe Out_Leeps.w; setKeyframe Tonque.w; }