// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- // UI Procs // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- /* * cMuscleSaveWeights() - Main Entry */ global proc cMuscleSaveWeights() { global int $gCMusclePaint_wtCnt ; global string $gCMusclePaint_wtLabels[] ; if (`window -q -ex cMuscleSaveWeightsWin`) { showWindow cMuscleSaveWeightsWin ; return ; } window -w 380 -h 280 -t (uiRes("m_cMuscleSaveWeights.kWindowTitleMuscleSaveWeights")) cMuscleSaveWeightsWin ; scrollLayout mainSaveLoadWeightsScrollLayout; columnLayout -parent mainSaveLoadWeightsScrollLayout -adj 1 mainCol ; // Top FORM // ///////////////////////////// formLayout -p mainCol topForm ; text -l (uiRes("m_cMuscleSaveWeights.kNode")) txSysSave ; textField -tx "" tfSysSave ; button -l "<<<" -w 30 -c ("cMSW_loadSys();") -ann (uiRes("m_cMuscleSaveWeights.kNodeAnnot")) btnSysSave ; popupMenu -p tfSysSave -pmc ("cMSW_buildSysMenu();") pmSysSave ; // SAVE FRAME // ///////////////////////////// frameLayout -l (uiRes("m_cMuscleSaveWeights.kSaveFrame")) -cl false -cll true -width 380 -p mainCol cMSW_SaveFrame ; formLayout -p cMSW_SaveFrame mainSaveForm ; text -l (uiRes("m_cMuscleSaveWeights.kFilenameSave")) txFileSave ; textField -tx "" tfFileWtsSave ; button -l "..." -w 30 -c ("cMSW_chooseFileSave();") -ann (uiRes("m_cMuscleSaveWeights.kFilenameSaveAnnot")) btnFileSave ; text -l (uiRes("m_cMuscleSaveWeights.kWeights")) -w 50 -al "left" txWtsSave ; optionMenu optWtsSave ; int $i ; for ($i=0; $i < $gCMusclePaint_wtCnt; ++$i) menuItem -l ($gCMusclePaint_wtLabels[ $i ]) ; optionMenu -e -sl 1 optWtsSave ; button -l (uiRes("m_cMuscleSaveWeights.kSaveWeights")) -c ("cMSW_saveUI();") -ann (uiRes("m_cMuscleSaveWeights.kSaveWeightsAnnot")) btnSave ; // LOAD FRAME // ///////////////////////////// frameLayout -l (uiRes("m_cMuscleSaveWeights.kLoadFrame")) -cl false -cll true -p mainCol cMSW_LoadFrame ; formLayout -p cMSW_LoadFrame mainLoadForm ; text -l (uiRes("m_cMuscleSaveWeights.kFilenameLoad")) txFileLoad ; textField -tx "" tfFileWtsLoad ; button -l "..." -w 30 -c ("cMSW_chooseFileLoad();") -ann (uiRes("m_cMuscleSaveWeights.kFilenameLoadAnnot")) btnFileLoad ; text -l (uiRes("m_cMuscleSaveWeights.kWeights2")) -w 50 -al "left" txWtsLoad ; optionMenu -cc ("cMSW_updateUI();") optWtsLoad ; for ($i=0; $i < $gCMusclePaint_wtCnt; ++$i) menuItem -l ($gCMusclePaint_wtLabels[ $i ]) ; optionMenu -e -sl 1 optWtsLoad ; radioButtonGrp -l (uiRes("m_cMuscleSaveWeights.kLoadBy")) -cc ("cMSW_updateUI();") -nrb 3 -la3 (uiRes("m_cMuscleSaveWeights.kLoadByPointOrder")) (uiRes("m_cMuscleSaveWeights.kLoadByWorldPos")) (uiRes("m_cMuscleSaveWeights.kLoadByLocalPos")) -sl 1 -cw4 52 70 80 80 -ann (uiRes("m_cMuscleSaveWeights.kLoadByAnnot")) rbgLoadBy ; text -l (uiRes("m_cMuscleSaveWeights.kMatchTolerance")) txTol ; floatField -w 150 -v -1.0 -min -1.0 -pre 6 -en false tfTol ; popupMenu -p tfTol ; menuItem -l "0.0001" -c ("floatField -e -v 0.0001 tfTol ;") ; menuItem -l "0.001" -c ("floatField -e -v 0.001 tfTol ;") ; menuItem -l "0.01" -c ("floatField -e -v 0.01 tfTol ;") ; menuItem -l "0.1" -c ("floatField -e -v 0.1 tfTol ;") ; menuItem -divider true ; menuItem -l (uiRes("m_cMuscleSaveWeights.kMatchToleranceDisabled")) -c ("floatField -e -v -1.0 tfTol ;") ; checkBox -l (uiRes("m_cMuscleSaveWeights.kPruneWeghtsTo")) -v 1 -cc ("cMSW_updateUI();") cbPrune ; intField -v 3 -min 1 -max 12 -w 40 ifPrune ; text -l (uiRes("m_cMuscleSaveWeights.kPruneWeightsTo2")) txPrune ; popupMenu -p ifPrune ; menuItem -l "1" -c ("intField -e -v 1 ifPrune ;") ; menuItem -l "2" -c ("intField -e -v 2 ifPrune ;") ; menuItem -l "3" -c ("intField -e -v 3 ifPrune ;") ; menuItem -l "4" -c ("intField -e -v 4 ifPrune ;") ; menuItem -l "5" -c ("intField -e -v 5 ifPrune ;") ; checkBox -l (uiRes("m_cMuscleSaveWeights.kNormalize")) -v 1 cbNormalize ; radioButtonGrp -l (uiRes("m_cMuscleSaveWeights.kMirrorPos")) -nrb 4 -la4 (uiRes("m_cMuscleSaveWeights.kMirrorPosNone")) (uiRes("m_cMuscleSaveWeights.kMirrorPosX")) (uiRes("m_cMuscleSaveWeights.kMirrorPosY")) (uiRes("m_cMuscleSaveWeights.kMirrorPosZ")) -sl 1 -en false -cw5 63 50 40 40 40 rbgMirror ; text -l (uiRes("m_cMuscleSaveWeights.kSearch")) txSearch ; textField -tx "" tfSearch ; text -l (uiRes("m_cMuscleSaveWeights.kReplace")) txReplace ; textField -tx "" tfReplace ; popupMenu -p tfSearch ; menuItem -l (uiRes("m_cMuscleSaveWeights.kSearchNone")) -c ("textField -e -tx \"\" tfSearch; textField -e -tx \"\" tfReplace; radioButtonGrp -e -sl 1 rbgMirror ; ") ; menuItem -l "Lf" -c ("textField -e -tx \"Lf\" tfSearch; textField -e -tx \"Rt\" tfReplace; radioButtonGrp -e -sl 2 rbgMirror ; ") ; menuItem -l "Rt" -c ("textField -e -tx \"Rt\" tfSearch; textField -e -tx \"Lf\" tfReplace; radioButtonGrp -e -sl 2 rbgMirror ; ") ; popupMenu -p tfReplace ; menuItem -l (uiRes("m_cMuscleSaveWeights.kReplaceNone")) -c ("textField -e -tx \"\" tfSearch; textField -e -tx \"\" tfReplace; radioButtonGrp -e -sl 1 rbgMirror ; ") ; menuItem -l "Rt" -c ("textField -e -tx \"Lf\" tfSearch; textField -e -tx \"Rt\" tfReplace; radioButtonGrp -e -sl 2 rbgMirror ; ") ; menuItem -l "Lf" -c ("textField -e -tx \"Rt\" tfSearch; textField -e -tx \"Lf\" tfReplace; radioButtonGrp -e -sl 2 rbgMirror ; ") ; button -l (uiRes("m_cMuscleSaveWeights.kSelectInfluences")) -c ("cMSW_selInfsFromFile();") -ann (uiRes("m_cMuscleSaveWeights.kSelectInfluencesAnnot")) btnSelJnts ; button -l (uiRes("m_cMuscleSaveWeights.kLoadWeights")) -c ("cMSW_loadUI();") -ann (uiRes("m_cMuscleSaveWeights.kLoadWeightsAnnot")) btnLoad ; formLayout -e -af txSysSave "top" 8 -an txSysSave "bottom" -af txSysSave "left" 5 -an txSysSave "right" -af tfSysSave "top" 5 -an tfSysSave "bottom" -ac tfSysSave "left" 5 txSysSave -ac tfSysSave "right" 5 btnSysSave -af btnSysSave "top" 5 -an btnSysSave "bottom" -an btnSysSave "left" -af btnSysSave "right" 5 topForm ; formLayout -e -af txFileSave "top" 5 -an txFileSave "bottom" -af txFileSave "left" 5 -an txFileSave "right" -af tfFileWtsSave "top" 5 -an tfFileWtsSave "bottom" -ac tfFileWtsSave "left" 5 txFileSave -ac tfFileWtsSave "right" 5 btnFileSave -af btnFileSave "top" 5 -an btnFileSave "bottom" -an btnFileSave "left" -af btnFileSave "right" 5 -ac txWtsSave "top" 5 txFileSave -an txWtsSave "bottom" -af txWtsSave "left" 5 -an txWtsSave "right" -ac optWtsSave "top" 5 txFileSave -an optWtsSave "bottom" -ac optWtsSave "left" 0 txWtsSave -an optWtsSave "right" -ac btnSave "top" 5 optWtsSave -af btnSave "bottom" 5 -af btnSave "left" 5 -af btnSave "right" 5 mainSaveForm ; formLayout -e -af txFileLoad "top" 5 -an txFileLoad "bottom" -af txFileLoad "left" 5 -an txFileLoad "right" -af tfFileWtsLoad "top" 5 -an tfFileWtsLoad "bottom" -ac tfFileWtsLoad "left" 5 txFileLoad -ac tfFileWtsLoad "right" 5 btnFileLoad -af btnFileLoad "top" 5 -an btnFileLoad "bottom" -an btnFileLoad "left" -af btnFileLoad "right" 5 -ac txWtsLoad "top" 5 txFileLoad -an txWtsLoad "bottom" -af txWtsLoad "left" 5 -an txWtsLoad "right" -ac optWtsLoad "top" 5 txFileLoad -an optWtsLoad "bottom" -ac optWtsLoad "left" 0 txWtsLoad -an optWtsLoad "right" -ac cbNormalize "top" 5 txFileLoad -an cbNormalize "bottom" -ac cbNormalize "left" 10 optWtsLoad -an cbNormalize "right" -ac rbgLoadBy "top" 5 optWtsLoad -an rbgLoadBy "bottom" -af rbgLoadBy "left" 5 -an rbgLoadBy "right" -ac txTol "top" 8 rbgLoadBy -an txTol "bottom" -af txTol "left" 5 -an txTol "right" -ac tfTol "top" 5 rbgLoadBy -an tfTol "bottom" -ac tfTol "left" 5 txTol -af tfTol "right" 5 -ac cbPrune "top" 8 tfTol -an cbPrune "bottom" -af cbPrune "left" 5 -an cbPrune "right" -ac ifPrune "top" 5 tfTol -an ifPrune "bottom" -ac ifPrune "left" 0 cbPrune -an ifPrune "right" -ac txPrune "top" 8 tfTol -an txPrune "bottom" -ac txPrune "left" 5 ifPrune -an txPrune "right" -ac rbgMirror "top" 5 ifPrune -an rbgMirror "bottom" -af rbgMirror "left" 5 -af rbgMirror "right" 5 -ac txSearch "top" 8 rbgMirror -an txSearch "bottom" -af txSearch "left" 5 -an txSearch "right" -ac tfSearch "top" 5 rbgMirror -an tfSearch "bottom" -ac tfSearch "left" 5 txSearch -ap tfSearch "right" 0 49 -ac txReplace "top" 8 rbgMirror -an txReplace "bottom" -ap txReplace "left" 0 51 -an txReplace "right" -ac tfReplace "top" 5 rbgMirror -an tfReplace "bottom" -ac tfReplace "left" 5 txReplace -af tfReplace "right" 5 -ac btnSelJnts "top" 5 tfSearch -af btnSelJnts "bottom" 5 -af btnSelJnts "left" 5 -ap btnSelJnts "right" 0 50 -ac btnLoad "top" 5 tfSearch -af btnLoad "bottom" 5 -ap btnLoad "left" 0 50 -af btnLoad "right" 5 mainLoadForm ; showWindow cMuscleSaveWeightsWin ; } // -------------------------------------------------------------------------- /* * cMSW_loadSys() - Loads the Maya Muscle node up into field */ global proc cMSW_loadSys() { string $objs[] = `ls -sl` ; if (size($objs) <= 0) return ; string $mSs[] = cMSW_getSysFromGeo($objs) ; string $mS ; if (nodeType($objs[0]) == "cMuscleSystem") { $mS = $objs[0] ; } else $mS = $mSs[0] ; textField -e -tx $mS tfSysSave ; } // -------------------------------------------------------------------------- /* * cMSW_getSysGeosInScene() - Returns list of all system def'd geo in scene */ global proc string[] cMSW_getSysGeosInScene() { string $mSs[] = `ls -type "cMuscleSystem" "*"`; // Get ALL Sys in scene. string $mS ; string $geos[] ; clear $geos; int $nGeo = 0 ; for ($mS in $mSs) { string $thisGeos[] = `cMuscleQuery -geo -system $mS` ; string $parents[] = `listRelatives -parent $thisGeos` ; $geos[$nGeo] = $parents[0] ; ++$nGeo ; } $geos = stringArrayRemoveDuplicates($geos) ; return $geos ; } // -------------------------------------------------------------------------- /* * cMSW_buildSysMenu() - Makes popup menu for the geo list */ global proc cMSW_buildSysMenu() { menu -e -dai pmSysSave ; setParent -menu pmSysSave ; string $geos[] = cMSW_getSysGeosInScene() ; string $g; $geos = `sort $geos` ; for ($g in $geos) { string $mSs[] = cMSW_getSysFromGeo({$g}) ; // Go back and get all Systems from this geo... string $mS ; for ($mS in $mSs) { menuItem -l ($g+" - "+$mS) -c ("select -r \""+$mS+"\"; cMSW_loadSys(); ") ; } } } // -------------------------------------------------------------------------- /* * cMSW_chooseFileSave() - Use the nicer Maya file browser.... */ global proc cMSW_chooseFileSave() { // See the top of fileBrowser.mel in Maya for info. // Basically you call : // fileBrowser( string $procCB, string $action, string $type, int $mode) ; // // $procCB = callback proc to be invoked when the action button is pressed // $action = label of the button in the browser that will do something, like "Load" or "Save" // $type = File type to be used... like *.mel // $mode = 0=read 1=write 2=write (no paths) 4=Read dir's only // // // The Callback proc must take two strings, and return an int // ie: // global proc int fileProcCB(string $file, string $type) // // $file = file or dir that was chosen // $type = type of file // Returns 1 if dialog should close and success, 0 if keep open and fail. // // Finally another useful items is: // global string $gDefaultFileBrowserDir; // // This will put the filebrowser to point to the path. Useful to make // it go somewhere right before the initial fileBrowser call. // global string $gDefaultFileBrowserDir; string $curFile = `textField -q -tx tfFileWtsSave` ; string $dir = dirname($curFile) ; if ($dir != "") $gDefaultFileBrowserDir = $dir; // And start in that place... fileBrowser( "cMSW_chooseFileSaveCB", (uiRes("m_cMuscleSaveWeights.kChoose")), "*.*", 1) ; } // -------------------------------------------------------------------------- /* * cMSW_chooseFileSaveCB() - Callback proc for fileBrowser call. */ global proc int cMSW_chooseFileSaveCB(string $file, string $type) { textField -e -tx $file tfFileWtsSave ; return 1 ; } // -------------------------------------------------------------------------- /* * cMSW_chooseFileLoad() - Use the nicer Maya file browser.... */ global proc cMSW_chooseFileLoad() { // See the top of fileBrowser.mel in Maya for info. // Basically you call : // fileBrowser( string $procCB, string $action, string $type, int $mode) ; // // $procCB = callback proc to be invoked when the action button is pressed // $action = label of the button in the browser that will do something, like "Load" or "Save" // $type = File type to be used... like *.mel // $mode = 0=read 1=write 2=write (no paths) 4=Read dir's only // // // The Callback proc must take two strings, and return an int // ie: // global proc int fileProcCB(string $file, string $type) // // $file = file or dir that was chosen // $type = type of file // Returns 1 if dialog should close and success, 0 if keep open and fail. // // Finally another useful items is: // global string $gDefaultFileBrowserDir; // // This will put the filebrowser to point to the path. Useful to make // it go somewhere right before the initial fileBrowser call. // global string $gDefaultFileBrowserDir; string $curFile = `textField -q -tx tfFileWtsLoad` ; string $dir = dirname($curFile) ; if ($dir != "") $gDefaultFileBrowserDir = $dir; // And start in that place... fileBrowser( "cMSW_chooseFileLoadCB", (uiRes("m_cMuscleSaveWeights.kChoose")), "*.*", 0) ; } // -------------------------------------------------------------------------- /* * cMSW_chooseFileLoadCB() - Callback proc for fileBrowser call. */ global proc int cMSW_chooseFileLoadCB(string $file, string $type) { textField -e -tx $file tfFileWtsLoad ; return 1 ; } // -------------------------------------------------------------------------- /* * cMSW_saveUI() - Wrapper for save from ui call */ global proc cMSW_saveUI() { global int $gCMusclePaint_wtCnt ; global string $gCMusclePaint_wtNames[] ; global string $gCMusclePaint_wtLabels[] ; global int $gCMusclePaint_wtNormalize[] ; string $sys = `textField -q -tx tfSysSave`; string $file = `textField -q -tx tfFileWtsSave` ; int $nWtName = `optionMenu -q -sl optWtsSave` - 1 ; int $bDoPrune = `checkBox -q -v cbPrune` ; int $prunePlaces = `intField -q -v ifPrune` ; string $wtName = $gCMusclePaint_wtNames[$nWtName] ; cMuscle_fixDisconnected($sys) ; string $comps[] = cMuscle_getSelComps($sys, true) ; cMSW_save($sys, $file, $comps, $wtName, $bDoPrune, $prunePlaces ) ; } // -------------------------------------------------------------------------- /* * cMSW_save() - Real Save proc */ global proc cMSW_save(string $sys, string $file, string $comps[], string $wtName, int $bDoPrune, int $prunePlaces) { if (size($comps) <= 0) { error -sl 0 (uiRes("m_cMuscleSaveWeights.kMustSelectPointsToSave")) ; } if ($file == "") { error -sl 0 (uiRes("m_cMuscleSaveWeights.kMustChooseFileToSave")); } if (`filetest -r $file`) // Does file already exist? { if (`filetest -w $file` != true) // If so is it not writable? { error -sl 0 (uiRes("m_cMuscleSaveWeights.kFileNotWritable")); } string $msg = (uiRes("m_cMuscleSaveWeights.kOverwriteFileMsg")); $msg = `format -stringArg $file $msg`; string $labelSave = "Save"; string $labelCancel = "Cancel"; string $ret = `confirmDialog -title (uiRes("m_cMuscleSaveWeights.kOverwriteFile")) -message ($msg) -button $labelSave -button $labelCancel -defaultButton $labelCancel -cancelButton $labelCancel -dismissString $labelCancel `; if ($ret != $labelSave) { print (uiRes("m_cMuscleSaveWeights.kSaveWeightsAborted")) ; return ; } } // Use plugin command to save... setAttr ($sys+".envelope") 1.0 ; // set to one to ensure wts built and valid first! refresh ; setAttr ($sys+".envelope") 0.0 ; select -r $comps ; cMuscleWeightSave-sys $sys -wt $wtName -f $file -action "save" ; setAttr ($sys+".envelope") 1.0 ; } // -------------------------------------------------------------------------- /* * cMSW_updateUI */ global proc cMSW_updateUI() { global int $gCMusclePaint_wtCnt ; global string $gCMusclePaint_wtNames[] ; global string $gCMusclePaint_wtLabels[] ; global int $gCMusclePaint_wtNormalize[] ; int $mode = `radioButtonGrp -q -sl rbgLoadBy` ; if ($mode == 1) // Order { floatField -e -en false tfTol ; radioButtonGrp -e -en false rbgMirror ; } else { floatField -e -en true tfTol ; radioButtonGrp -e -en true rbgMirror ; } int $prune = `checkBox -q -v cbPrune` ; intField -e -en $prune ifPrune ; int $nWtName = `optionMenu -q -sl optWtsLoad` - 1 ; checkBox -e -v $gCMusclePaint_wtNormalize[$nWtName] cbNormalize ; } // -------------------------------------------------------------------------- /* * cMSW_loadUI() - Wrapper for load from ui call */ global proc cMSW_loadUI() { global int $gCMusclePaint_wtCnt ; global string $gCMusclePaint_wtNames[] ; global string $gCMusclePaint_wtLabels[] ; global int $gCMusclePaint_wtNormalize[] ; string $sys = `textField -q -tx tfSysSave`; string $file = `textField -q -tx tfFileWtsLoad` ; int $mode = `radioButtonGrp -q -sl rbgLoadBy` ; float $tol = `floatField -q -v tfTol` ; int $mirrorMode = `radioButtonGrp -q -sl rbgMirror` ; string $search = `textField -q -tx tfSearch` ; string $replace = `textField -q -tx tfReplace` ; int $bDoPrune = `checkBox -q -v cbPrune` ; int $prunePlaces = `intField -q -v ifPrune` ; int $bNormalize = `checkBox -q -v cbNormalize` ; int $nWtName = `optionMenu -q -sl optWtsLoad` - 1 ; string $wtName = $gCMusclePaint_wtNames[$nWtName] ; cMuscle_fixDisconnected($sys) ; string $comps[] = cMuscle_getSelComps($sys, true) ; cMSW_load($sys, $file, $comps, $wtName, $mode, $tol, $mirrorMode, $search, $replace, $bDoPrune, $prunePlaces, $bNormalize) ; } // -------------------------------------------------------------------------- /* * cMSW_load() - Real load proc */ global proc cMSW_load(string $sys, string $file, string $comps[], string $wtName, int $mode, float $tol, int $mirrorMode, string $search, string $replace, int $bDoPrune, int $prunePlaces, int $bNormalize) { if (size($comps) <= 0) { error -sl 0 (uiRes("m_cMuscleSaveWeights.kMustSelectPointsToLoad")) ; } if ($file == "") { error -sl 0 (uiRes("m_cMuscleSaveWeights.kMustChooseFileToLoad")); } if (`filetest -r $file` != true) // Does file already exist? { string $msg = (uiRes("m_cMuscleSaveWeights.kFileDoesNotExist")); $msg = `format -stringArg $file $msg`; error -sl 0 ($msg) ; } string $modeStr = "" ; if ($mode == 1) // Order $modeStr = "pointorder" ; else $modeStr = "pointposition" ; if (!$bDoPrune) $prunePlaces = -1 ; // Call plugin to do actual save. setAttr ($sys+".envelope") 0.0 ; select -r $comps ; cMuscleWeightSave -sys $sys -wt $wtName -f $file -action "load" -mode $modeStr -prune $prunePlaces -axis ($mirrorMode-2) -tolerance $tol -src $search -rep $replace -normalize $bNormalize ; setAttr ($sys+".envelope") 1.0 ; } // -------------------------------------------------------------------------- /* * cMSW_selInfsFromFile() - Given a save wt file, this re-selects all the bones/muscles * that were used in it, but with search/replace in effect as well. */ global proc cMSW_selInfsFromFile() { string $file = `textField -q -tx tfFileWtsLoad` ; string $search = `textField -q -tx tfSearch` ; string $replace = `textField -q -tx tfReplace` ; string $inf ; string $infs[] = `cMuscleWeightSave -f $file -action "infs" -src $search -rep $replace` ; select -cl ; for ($inf in $infs) { if (objExists($inf)) select -add $inf ; else { string $msg = (uiRes("m_cMuscleSaveWeights.kObjectDoesNotExist")); $msg = `format -stringArg $inf $msg`; warning -sl 0 $msg ; } } print (uiRes("m_cMuscleSaveWeights.kSelectedOriginalInfluences")) ; } // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- // Helper System Procs // -------------------------------------------------------------------------- // -------------------------------------------------------------------------- global proc string[] cMSW_getSysFromGeo(string $objs[]) { string $mSs[] ; clear $mSs ; if (size($objs) <= 0 || $objs[0] == "") return $mSs ; string $hist[] = `listHistory -pdo true -il 1 $objs`; $mSs = `ls -type "cMuscleSystem" $hist` ; return $mSs ; } // --------------------------------------------------------------------------