/* All Rights Reserved @ 2008 by Sin L. Animation Copy tool version 2.5 Written by Sin Loh, jcsin@hotmail.com <<--Description-->> The "Animation Copy" allow maya users to record the pose, or animation in a text file that stored in a directory the users have picked; the directory the users picked will be recorded down(in anmPose_userPrefs.mel) so users don't have to go in to pick the directory again next time they start the tool. You could also type the directory path in the directory textfield and press "Enter" on the numpad to save the directory info. Pose and Animation keys are stored in .pose and .anm respectively to distinguish the format, users can open the file with notepad and edit the key datas as they want. The script is copying and pasting the animation keys based on the name of the nodes, so identical node names are required to get the keys transfered/copied over. The second function in this toolset is the "Animation Transfer", it works differently from the above mentioned. This script can do a batch transfer of animation keys to a different character that have the same node names. <<--Known bugs-->> 1) When the users' Maya scene has same node names, which create pipe like xyx|abc resulting in error. While this is not an actual bug bcos you are not supposed to have duplicated names, here is the solution: Find the duplicated node names and rename them uniquely. Or use my renameDuplicate mel script. 2) When the maya scene contain myterious nodes like "unknown". delete the "unknown" node would fix the problem. You can use the script to fix the problem--> delete `ls -type "unknown"`; Run "my_AnmCopyWindowProc" after you source the scritps. Please feel free to give me feedbacks and questions to my email, jcsin@hotmail.com */ global string $anmPoseUserPref = "anmPose_userPrefs.mel"; //the name of pref. mel file is editable here. global string $anmPoseFileName; $anmPoseFileName =( `internalVar -userPrefDir` + $anmPoseUserPref ); //this is the userpref directory + filename //Check the status of "anmPose_userPrefs.mel", if it doesn't exist, create one. global proc checkAnmPrefstatus() { global string $anmPoseFileName; int $filestatus = `filetest -f $anmPoseFileName`; if ($filestatus == 0) { $fileId=`fopen $anmPoseFileName`; fclose $fileId; } } //procedure for keeping the user's directory path in the tool, fprinted in the anmPose_userPrefs.mel //so even the user close the window, the path info in the tool will be kept. global proc sin_setAsDefaultDir() { global string $anmPoseUserPref; global string $anmPoseFileName; string $dirText = `textField -q -text as_savedirTF`; int $filestatus = `filetest -f $anmPoseFileName`; if ($filestatus == 1) { $fileId=`fopen $anmPoseFileName "w"`; fprint $fileId $dirText; fclose $fileId; } else { $fileId=`fopen $anmPoseFileName "w"`; fprint $fileId $dirText; fclose $fileId; } } //procedure for reading the user's directory path in the userpref.mel global proc sin_readAnmPose_userPrefs() { global string $anmPoseUserPref; global string $anmPoseFileName; int $filetest = `filetest -f $anmPoseFileName`; if ($filetest == 1) { $fileId=`fopen $anmPoseFileName "r"`; while ( !`feof $fileId` ) { string $nextWord = `fgetword $fileId`; if ( size( $nextWord ) > 0 ) { textField -e -text $nextWord as_savedirTF; //print ( $nextWord + "\n" ); } } fclose $fileId; } } //this is the command will be executed when press enter in the textfield global proc textFieldEnterCommand() { sin_setAsDefaultDir; sin_readAnmPose_userPrefs; as_populateDirFileProc; } // return procedure to find all nodes with have keys global proc string [] ac_findNodesWithKeysProc() { //This will return nodes and thier attributes string $returnAllKeyNodes[]; string $finalNodes[]; int $inclcamCBstate = `checkBox -q -v inclcamCB`; int $inclcstCBstate = `checkBox -q -v inclcstCB`; if ($inclcamCBstate == 0 && $inclcstCBstate == 1 ) { string $allNodes[] =`ls -type transform`; string $lsCamerasRemoved[] =`listCameras`; $finalNodes = stringArrayRemove($lsCamerasRemoved, $allNodes); } if ($inclcamCBstate == 1 && $inclcstCBstate == 0 ) { string $allNodes[] =`ls -type transform`; string $lsConstraintRemoved[] =`ls -type constraint`; $finalNodes = stringArrayRemove($lsConstraintRemoved, $allNodes); } if ($inclcamCBstate == 0 && $inclcstCBstate == 0 ) { string $allNodes[] =`ls -type transform`; string $lsConstraintRemoved[] =`ls -type constraint`; string $lsCamerasRemoved[] =`listCameras`; string $NoConstraintNodes[] = stringArrayRemove($lsConstraintRemoved, $allNodes); $finalNodes = stringArrayRemove($lsCamerasRemoved, $NoConstraintNodes); } if ($inclcamCBstate == 1 && $inclcstCBstate == 1 ) { $finalNodes =`ls -type transform`; } for ($x=0; $x 0) { string $attrOnly[] =`listAttr -k $finalNodes[$x]`; for ($y=0; $y 0) { $returnAllKeyNodes[size($returnAllKeyNodes)] = $nodesAttrs; } } } } return $returnAllKeyNodes; } //return procedure to find keys from selected nodes only. global proc string [] as_findSelectedNodesProc() { //This will return selected nodes and thier attributes string $returnSelectedNodes[]; string $allnode[] =`textScrollList -q -ai as_selectedNodeTSL`; for ($x=0; $x 0) { $returnSelectedNodes[size($returnSelectedNodes)] = $nodesAttrs; } } } return $returnSelectedNodes; } // Copy All or only Selected Nodes that have animation keys global proc as_printToFileProc() { sin_setAsDefaultDir; //Print all to file, with time range option available global string $dirname; $dirName =`textField -q -text as_savedirTF`; string $anmName =`textField -q -text as_AnmNameTF`; global string $outputName; $outputName = ($dirName + "/" + $anmName + ".anm"); //After the error checking and confirm overwrite, the exists file will be deleted. int $fileExist =`filetest -f $outputName`; //print $fileExist; if ($fileExist == 1) { sysFile -delete $outputName; } //choose either print all to file, or print only selected nodes to file string $copyAttributesAll[]; int $checkCB = `checkBox -q -v copylistedCB`; //if only selected if ($checkCB == 1) { $copyAttributesAll = as_findSelectedNodesProc(); if (size($copyAttributesAll) < 1 ) { error "Nothing in the list."; } } else { $copyAttributesAll = ac_findNodesWithKeysProc(); //find all nodes with keys } for ($x=0; $x=1) { string $confirm =`confirmDialog -title "Are you sure?" -message ("Do you want to delete " + $outputTSL[0] + "\n" + "from the window system?") -button "Ok" -button "Cancel" -defaultButton "Ok" -cancelButton "Cancel" -dismissString "Cancel"`; if ($confirm == "Ok") { as_delSelectedTSLFile; } } else{ error "Hellooo!! There is nothing to delete! Dude! \n"; } } //when select a item from textscrollist, it will appear the name at the textfield. global proc as_fillDirNameProc() { string $buffer[]; string $selItem[] =`textScrollList -q -selectItem as_AnmStoringTSL`; tokenize $selItem[0] "." $buffer; textField -e -text $buffer[0] as_AnmNameTF; } //pick a directory folder global proc as_pickDirectoryProc( string $filename, string $fileType ) { int $poseRBOnOff = `radioButton -q -sl poseRB`; string $fileList[]; if ($poseRBOnOff == 1) { $fileList =`getFileList -folder ($filename + "/") -filespec "*.pose"`; } else { $fileList =`getFileList -folder ($filename + "/") -filespec "*.anm"`; } textScrollList -e -ra as_AnmStoringTSL; for ($each in $fileList) { textScrollList -e -append $each as_AnmStoringTSL; } textField -e -text ($filename + "/") as_savedirTF; sin_setAsDefaultDir;//after pick the directory, the path will be recorded in usepref.mel } global proc as_pickDirProc() { fileBrowserDialog -m 4 -fc "as_pickDirectoryProc" -an "Choose a directory" -om "Import"; } //refresh the textscrollist. global proc as_populateDirFileProc() { string $dirName =`textField -q -text as_savedirTF`; int $poseRBOnOff = `radioButton -q -sl poseRB`; string $fileList[]; if ($poseRBOnOff == 1) { $fileList =`getFileList -fld ($dirName + "/") -filespec "*.pose"`; } else { $fileList =`getFileList -fld ($dirName + "/") -filespec "*.anm"`; } textScrollList -e -ra as_AnmStoringTSL; for ($each in $fileList) { textScrollList -e -append $each as_AnmStoringTSL; } string $temp[] =`textScrollList -q -ai as_AnmStoringTSL`; if (size($temp)>0) { textScrollList -e -sii 1 as_AnmStoringTSL; } } //add selected nodes to textscrolist global proc as_addSelectedProc() { string $sel[]=`ls -sl`; string $list[] = `textScrollList -q -ai as_selectedNodeTSL`; string $finalList[] = stringArrayCatenate( $sel, $list ) ; string $shorterList[] = stringArrayRemoveDuplicates($finalList); $shorterList = `sort $shorterList`; textScrollList -e -ra as_selectedNodeTSL; for ($each in $shorterList) { textScrollList -e -a $each as_selectedNodeTSL; } } //to remove item from textscrollist global proc as_removeSelectedProc() { string $selecteditem[] = `textScrollList -q -si as_selectedNodeTSL`; for ($each in $selecteditem){ textScrollList -e -ri $each as_selectedNodeTSL; select -cl; } } //clear everything from textscrollist global proc as_clearListSelectedNodeTSLProc() { textScrollList -e -ra as_selectedNodeTSL; select -cl; } //////////////////////////////////////////////////////// ///////////////////////////////////////////////////////// //Paste Animation procedures start here////////////////// //////////////////////////////////////////////////////// //////////////////////////////////////////////////////// global proc float findExactKeyframe( float $firstKeyFrame, float $currentTime, float $keyFrame) { float $keyFrameSet; //This is to find value the differences between the first keyframe and current time //so the script could find the exact offset values of the keyframes got pasted. //reason is negative and positive of the current time possibilites animators would choose int $frameDiff = $firstKeyFrame - $currentTime; $frameDiff = abs ($frameDiff); //I just want to know the differences, no negative value needed if ($firstKeyFrame <= $currentTime) //reason is negative and positive current time possibilites animator would choose { //if the current time value is equal or bigger than the keyFrame,then using "ADD", else use "Substract" $keyFrameSet = ($keyFrame + $frameDiff); } else { $keyFrameSet = ($keyFrame - $frameDiff); } return $keyFrameSet; } global proc as_pasteAnmProc() { string $dirName =`textField -q -text as_savedirTF`; string $fileName[] =`textScrollList -q -si as_AnmStoringTSL`; if (size($fileName)<1) { error "Select an animation."; } int $fileId=`fopen ($dirName + "/" + $fileName[0]) "r"`; float $currentTime =`currentTime -q`; string $nodeAttrType[]; string $nodeName; string $allKeyframes[]; string $weightedTangents[]; string $Lock[]; string $weightLock[]; string $inTangentType[]; string $outTangentType[]; string $inWeight[]; string $outWeight[]; string $inAngle[]; string $outAngle[]; float $keyFrame; float $keyValue; float $keyFrameSet; float $firstKeyFrame; while (!`feof $fileId` ) { $nextLine = `fgetline $fileId`; if (size ($nextLine) > 0) { string $buffer[]; tokenize $nextLine ":" $buffer; if ( startsWith (strip($buffer[0]), "nodeAttrType") ) { tokenize (strip($buffer[1])) "." $nodeAttrType; $nodeName = ($nodeAttrType[0] + "." + $nodeAttrType[1]); } if ( startsWith (strip($buffer[0]), "keyframes") ) { tokenize (strip($buffer[1])) " " $allKeyframes; if (`objExists $nodeName`) { int $checkAttrKeyable = `getAttr -k $nodeName`; int $checkAttrLock = `getAttr -l $nodeName`; if ($checkAttrLock == 0 && $checkAttrKeyable == 1 ) { $firstKeyFrame = float ($allKeyframes[0]); //find the first keyframe only. for ($x=0; $x 0) { string $attrOnly[] =`listAttr -k $allnode[$x]`; for ($y=0; $y 0) { $returnAllKeyNodes[size($returnAllKeyNodes)] = $nodesAttrs; } } } } return $returnAllKeyNodes; } global proc string [] ps_findSelectedNodesProc() { //This will return nodes and thier attributes string $returnSelectedNodes[]; string $allnode[] =`textScrollList -q -ai as_selectedNodeTSL`; for ($x=0; $x 0 ) { $allKeyNodes[0] = $nextLine; if (size ($allKeyNodes[0]) > 1) { string $buffer[]; tokenize $allKeyNodes[0] "," $buffer; //tokenize to nodes and values; string $getOnlyNodes = $buffer[0]; float $getOnlyValues = float ($buffer[1]); //check if the attribute is setable by setAttr, and if object exists if (`objExists $getOnlyNodes`) { int $setableBoo = `getAttr -se $getOnlyNodes`; if ($setableBoo == 1) { setAttr $getOnlyNodes $getOnlyValues; setKeyframe $getOnlyNodes; print ("set " + $getOnlyNodes + " = " + $getOnlyValues + "\n"); } } } } } fclose $fileId; //scriptEditorInfo -se 0 -sw 0 -si 0 -sr 0; print "Result: Processed."; } //==========================================================// //=================Animation Transfer=======================// //===========================================================// //=======================================================================================================// //================================= Directory ====================================================// //=======================================================================================================// //=======================================================================================================// //updating the checkBox buttons that list out .ma or .mb files global proc refreshcbStateProc() { textScrollList -e -ra sourceBatchTSL; int $cbmastate = `checkBox -q -v cballma`; int $cbmbstate = `checkBox -q -v cballmb`; string $sourceFolderTF =`textField -q -text sourceTF`; string $fileList1[]; string $fileList2[]; if ($cbmastate == 1 && $cbmbstate == 0) { $fileList1 =`getFileList -folder ($sourceFolderTF + "/") -filespec "*.ma"`; } if ($cbmastate == 0 && $cbmbstate == 1) { $fileList1 =`getFileList -folder ($sourceFolderTF + "/") -filespec "*.mb"`; } if ($cbmbstate == 1 && $cbmastate == 1) { $fileList1 =`getFileList -folder ($sourceFolderTF + "/") -filespec "*.mb"`; $fileList2 =`getFileList -folder ($sourceFolderTF + "/") -filespec "*.ma"`; $fileList1 = `stringArrayCatenate $fileList1 $fileList2`; } for ($eachfileList in $fileList1) { textScrollList -e -append $eachfileList sourceBatchTSL; } selectAllProc; } global proc pickDirectoryProc( string $filename, string $fileType ) { int $cbmastate = `checkBox -q -v cballma`; int $cbmbstate = `checkBox -q -v cballmb`; string $fileList1[]; string $fileList2[]; if ($cbmastate == 1 && $cbmbstate == 0) { $fileList1 =`getFileList -folder ($filename + "/") -filespec "*.ma"`; } if ($cbmastate == 0 && $cbmbstate == 1) { $fileList1 =`getFileList -folder ($filename + "/") -filespec "*.mb"`; } if ($cbmbstate == 1 && $cbmastate == 1) { $fileList1 =`getFileList -folder ($filename + "/") -filespec "*.mb"`; $fileList2 =`getFileList -folder ($filename + "/") -filespec "*.ma"`; $fileList1 = `stringArrayCatenate $fileList1 $fileList2`; } textScrollList -e -ra sourceBatchTSL; for ($eachfileList in $fileList1) { textScrollList -e -append $eachfileList sourceBatchTSL; } textField -e -text $filename sourceTF; } global proc pickDirProc() { if (`checkBox -q -v cbbf`==1) { fileBrowserDialog -m 4 -fc "pickDirectoryProc" -an "Pick a directory" -om "Import"; selectAllProc; } else { textScrollList -e -ra sourceBatchTSL; string $path =`fileDialog -directoryMask "/user/*.ma;*.mb"`; string $singlefilename =basename( $path, "" ); string $singlepath = dirname( $path ); textField -e -text $singlepath sourceTF; textScrollList -e -append $singlefilename sourceBatchTSL; selectAllProc; } } global proc savedToPickDirProc() { fileBrowserDialog -m 4 -fc "savedToDirProc" -an "Pick a directory" -om "Import"; } global proc savedToDirProc( string $filename, string $fileType ) { textField -e -text ($filename +"/") savedToTF; } global proc targetAcqProc() { string $singlesource =`fileDialog -directoryMask "/user/*.ma;*.mb"`; textField -e -text $singlesource targetRigTF; } global proc savedToProc() { string $singlesource =`fileDialog -directoryMask "/user/*.ma;*.mb"`; textField -e -text $singlesource savedToTF; } global proc sourceAcqProc() { string $singlesource =`fileDialog -directoryMask "/user/*.ma;*.mb"`; textScrollList -e -ra sourceBatchTSL; textScrollList -e -append $singlesource sourceBatchTSL; } global proc directoryProc() { if (`checkBox -q -v cbbf`==1) { checkBox -e -en true cbsl; checkBox -e -en 1 cballma; checkBox -e -en 1 cballmb; } else { checkBox -e -en false cbsl; checkBox -e -en 0 cballma; checkBox -e -en 0 cballmb; } } global proc selectAllProc() { if (`checkBox -q -v cbsl`==1) { string $allitemsource[]=`textScrollList -q -ai sourceBatchTSL`; for ($eachitem in $allitemsource) { textScrollList -e -si $eachitem sourceBatchTSL; } } else { textScrollList -e -da sourceBatchTSL; } } global proc clearListProc() { textScrollList -e -ra sourceBatchTSL; } //=======================================================================================================// //============================== Animation Transfer =============================================// //=======================================================================================================// //=======================================================================================================// global proc string[] getNodesFromNamespace (string $nodes[]) { string $returnBuffer[]; for ($i = 0; $i < size($nodes);$i++) { string $buffer[]; tokenize $nodes[$i] ":" $buffer; $returnBuffer[$i] = $buffer[(size($buffer) - 1)]; } return $returnBuffer; } global proc AnmTransfer() { global string $sourceFolderTF; global string $tfSavedTo; //Target File/Rig $tfTarget = `textField -q -text targetRigTF`; //Saved to Directory $tfSavedTo =`textField -q -text savedToTF`; //Source folder $sourceFolderTF =`textField -q -text sourceTF`; //Prefix and Suffix that will rename to the saved files $suffixTF =`textField -q -text suffixTF`; $prefixTF =`textField -q -text prefixTF`; //Source animation files string $tfSource []= `textScrollList -q -si sourceBatchTSL`; if(!`filetest -d $tfSavedTo`) sysFile -makeDir $tfSavedTo; for ($z=0; $z 0) { copyKey -time ":" -float ":" -hierarchy none -controlPoints 0 -shape 1 ("*Source:" + $nodesCopy[$x] + "*"); if( `objExists ("Target:" + $nodesCopy[$x] + "*")` ) { pasteKey -time 1 -float 1 -option "replaceCompletely" {"*Target:" + $nodesCopy[$x] + "*"}; } } } //delete and remove prefix group -n groupTemp "Source:*" ; delete groupTemp; namespace -f -mv "Target" ":"; namespace -rm "Target"; //save the finished files to file -rename ($tfSavedTo + $prefixTF + $saveFilename + $suffixTF);file -save -type "mayaAscii"; } } //===============================================================// //===============================================================// //====================== Animation Copy Window===================// //===============================================================// //===============================================================// global proc my_AnmCopyWindowProc() { if (`window -exists my_AnmCopyWindow`) { deleteUI my_AnmCopyWindow; windowPref -remove my_AnmCopyWindow; } window -w 238 -h 450 -s true -maximizeButton 0 -t "Animation Copy" -le 900 my_AnmCopyWindow; string $anmCopytabs = `tabLayout -innerMarginWidth 1 -innerMarginHeight 5 -scrollable false`; string $child1 =`columnLayout -adj false`; frameLayout -w 220 -label "Store Animation Keys" -cll true -cl false; columnLayout -adj false; separator -w 220 -h 3 -style "in"; separator -w 220 -h 3 -style "none"; rowColumnLayout -numberOfColumns 2 -columnAttach 1 "both" 20 -columnWidth 1 120 -columnWidth 2 80; radioCollection PoseAnimationRBC; radioButton -w 100 -sl -label "Pose" -onCommand copyPoseCommandProc poseRB; radioButton -w 100 -label "Animation" -onCommand copyAnmCommandProc anmRB; setParent..; separator -w 220 -h 3 -style "in"; separator -w 220 -h 3 -style "none"; rowColumnLayout -numberOfColumns 3 -columnAttach 1 "left" 5 -columnWidth 1 60 -columnWidth 2 20 -columnWidth 3 135; text -label "Saved Dir."; button -bgc 0.8 0.8 0.8 -l ".." -c as_pickDirProc; textField -enterCommand textFieldEnterCommand as_savedirTF; setParent..; rowColumnLayout -numberOfColumns 3 -columnAttach 1 "left" 5 -columnWidth 1 80 -columnWidth 2 135; text -label "File Name :"; textField as_AnmNameTF; setParent..; separator -style "none"; rowColumnLayout -nc 4 -cw 1 110 -cw 2 105; frameLayout -mw 3 -mh 3 -lv false -bs "etchedOut"; columnLayout -w 110 -adj false; radioCollection; radioButton -vis 0 -sl -en 0 -label "All" copyAllRB; radioButton -vis 0 -en 0 -label "Time Slider" timeRangeRB; separator -style "none"; button -label "Copy Pose" -h 30 -w 100 -bgc 0.8 0.8 0.8 -c as_checkingDirFilesProc copyToFileButton; separator -h 3 -style "none"; checkBox -label "Listed Only" -cc expandlistedOnlyframeLayout copylistedCB; separator -w 220 -h 3 -style "in"; checkBox -en 0 -label "incl. cameras" inclcamCB; checkBox -en 0 -v 0 -label "incl. constraints" inclcstCB; setParent..; setParent..; frameLayout -mh 3 -mw 3 -h 94 -lv false -bs "etchedOut"; columnLayout -w 110 -adj false; radioCollection; text -vis 0 -l "Choose a frame in" chooseAFrameT; text -vis 0 -label "time slider to paste" timeRange2PasteT; separator -style "none"; button -label "Paste Pose" -h 30 -w 95 -bgc 0.65 0.65 0.65 -c ps_pastePoseFromFile pasteToSceneButton; separator -h 18 -style "none"; separator -w 100 -style "in"; separator -style "none"; button -label "Delete" -h 30 -w 95 -bgc 1 0.992 0.656 -c as_deleteConfirmWinProc; setParent..; setParent..; setParent..; separator -h 3 -style "none"; textScrollList -h 152 -w 210 -selectCommand as_fillDirNameProc -doubleClickCommand as_doubleClickOpenDataProc as_AnmStoringTSL; separator -h 3 -style "none"; separator-h 3 -style "none"; frameLayout -w 220 -vis false -label "Copy Listed Nodes" -cll true -cl true listedOnlyFL; columnLayout -adj false; separator -w 210 -h 3 -style "in"; separator -w 210 -h 3 -style "in"; rowColumnLayout -numberOfColumns 3 -columnAttach 1 "both" 0 -columnWidth 1 75 -columnWidth 2 75 -columnWidth 3 60; button -label "+" -bgc 0.65 0.65 0.65 -c as_addSelectedProc addButton; button -label "-" -bgc 0.8 0.8 0.8 -c as_removeSelectedProc removeButton; button -label "Clear List" -bgc 1 0.992 0.656 -c as_clearListSelectedNodeTSLProc; setParent..; separator -h 3 -style "none"; textScrollList -allowMultiSelection true -h 150 -w 210 -sc as_selectSelectedFromTSLProc as_selectedNodeTSL; //separator -w 220 -h 3 -style "none"; //separator -w 220 -h 3 -style "none"; setParent..; setParent..; setParent..; setParent..; setParent..; //=========Second tab : Animation Transfer==============// string $child2 = `columnLayout -adj true`; frameLayout -w 220 -label "Animation Transfer" -cll true -cl false; columnLayout -adj true; separator -w 220 -h 3 -style "in"; rowColumnLayout -numberOfColumns 3 -columnAttach 1 "left" 5 -columnWidth 1 70 -columnWidth 2 20 -columnWidth 3 128; text -label "Target File..."; button -l ".." -c targetAcqProc; textField targetRigTF; text -label "Saved Dir."; button -l ".." -c savedToPickDirProc; textField -text "c:/temp/" savedToTF; setParent..; rowColumnLayout -numberOfColumns 5 -columnAttach 1 "left" 10 -columnWidth 1 70 -columnWidth 2 30 -columnWidth 3 40 -columnWidth 4 28 -columnWidth 5 49; text -label "add"; text -label "prefix"; textField prefixTF; text -label "suffix"; textField -text "_new" suffixTF; setParent..; rowColumnLayout -numberOfColumns 3 -columnAttach 1 "left" 10 -columnWidth 1 70 -columnWidth 2 20 -columnWidth 3 128; text -label "Source...."; button -l ".." -c pickDirProc; textField sourceTF; setParent..; rowColumnLayout -numberOfColumns 3 -columnAttach 1 "left" 10 -columnWidth 1 70 -columnWidth 2 80 -columnWidth 3 90; text -label "check if"; checkBox -l "batch files" -v 1 -cc directoryProc cbbf; checkBox -l "select all" -en true -value 1 -cc selectAllProc cbsl; text -label "file type"; checkBox -l ".ma" -v 1 -cc refreshcbStateProc cballma; checkBox -l ".mb" -v 1 -cc refreshcbStateProc cballmb; setParent..; separator -style "in"; separator -style "in"; rowColumnLayout -numberOfColumns 2 -columnAttach 1 "both" 0 -columnWidth 1 160 -columnWidth 2 57; button -h 30 -label "Copy" -bgc 0.8 0.8 0.8 -c AnmTransfer; button -label "Clear list" -bgc 1 0.992 0.656 -c clearListProc; setParent..; separator -style "in"; columnLayout -adj true; textScrollList -h 200 -allowMultiSelection true sourceBatchTSL; setParent..; setParent..; setParent..; setParent..; tabLayout -edit -tabLabel $child1 "Copy" -tabLabel $child2 "Transfer" $anmCopytabs; showWindow my_AnmCopyWindow; checkAnmPrefstatus; sin_readAnmPose_userPrefs; as_populateDirFileProc; }