//DAM Maya v0.1 //by Matt Ovens //Bournemouth University BACVA3 Innovations Project //Main procedure for setting up the user interface //------------------------------------------------ global proc DAMmaya() { if (`windowPref -ex "DAMmaya_win"`) windowPref -r "DAMmaya_win"; if (`window -ex "DAMmaya_win"`) deleteUI -wnd "DAMmaya_win"; $window = `window -title "DAM Maya v0.1" -width 591 -height 600 -rtf false -sizeable true "DAMmaya_win"`; string $form = `formLayout "DAMmaya_topForm"`; string $statusBar = `textField -editable false "statusBar"`; string $tabs = `tabLayout -innerMarginWidth 5 -innerMarginHeight 5 "DAMmaya_tabs"`; formLayout -edit -attachForm $tabs "top" 0 -attachForm $tabs "left" 0 -attachControl $tabs "bottom" 0 $statusBar -attachForm $tabs "right" 0 -attachNone $statusBar "top" -attachForm $statusBar "left" 0 -attachForm $statusBar "bottom" 0 -attachForm $statusBar "right" 0 $form; string $tab1 = `formLayout "DAMmaya_tab1"`; string $dirPathName = `textField -tx "/Enter/directory/path" -w 300 -enterCommand "showThumbs(0)" "dirPathName"`; string $updateButton = `button -l "Update" -al center -rs 1 -c "showThumbs(0)"`; string $browseButton = `button -l "Browse" -al "center" -rs 1 -c "fileBrowser( \"onSelect\", \"Select\", \"\", 4 )" "browseButton"`; string $setupButton = `button -l "Setup Directories" -al "center" -rs 1 -c "setupDir()" "setupButton"`; string $refThmButton = `button -l "Refresh Thumbnails" -al "center" -rs 1 -c "showThumbs(1)" "refThmButton"`; string $separator1 = `separator -horizontal false -width 4 -height 22`; string $rendererSelect = `radioButtonGrp -numberOfRadioButtons 2 -label "Renderer:" -labelArray2 "Hardware" "Software" -sl 1 -cw3 70 70 70 "rendererSelect"`; string $separator2 = `separator -height 4`; string $scroll = `scrollLayout -w 581 -h 492 -childResizable true -minChildWidth 368 -hst 16 -vst 16 "DAMmaya_tab1_scroll"`; gridLayout -numberOfColumns 3 -numberOfRows 3 -cellWidthHeight 184 166 -columnsResizable true -autoGrow true -aec true "DAMmaya_tab1_thumbView"; setParent ..; setParent ..; formLayout -edit -attachForm $dirPathName "top" 0 -attachForm $dirPathName "left" 0 -attachNone $dirPathName "bottom" -attachControl $dirPathName "right" 0 $updateButton -attachForm $updateButton "top" 0 -attachNone $updateButton "left" -attachNone $updateButton "bottom" -attachControl $updateButton "right" 0 $browseButton -attachForm $browseButton "top" 0 -attachNone $browseButton "left" -attachNone $browseButton "bottom" -attachForm $browseButton "right" 0 -attachControl $setupButton "top" 0 $dirPathName -attachForm $setupButton "left" 0 -attachNone $setupButton "bottom" -attachNone $setupButton "right" -attachControl $refThmButton "top" 0 $dirPathName -attachControl $refThmButton "left" 0 $setupButton -attachNone $refThmButton "bottom" -attachNone $refThmButton "right" -attachControl $separator1 "top" 4 $dirPathName -attachControl $separator1 "left" 0 $refThmButton -attachNone $separator1 "bottom" -attachNone $separator1 "right" -attachControl $rendererSelect "top" 4 $dirPathName -attachControl $rendererSelect "left" 0 $separator1 -attachNone $rendererSelect "bottom" -attachNone $rendererSelect "right" -attachControl $separator2 "top" 0 $setupButton -attachForm $separator2 "left" 0 -attachNone $separator2 "bottom" -attachForm $separator2 "right" 0 -attachControl $scroll "top" 0 $separator2 -attachForm $scroll "left" 0 -attachForm $scroll "bottom" 0 -attachForm $scroll "right" 0 $tab1; setParent ..; string $tab2 = `formLayout "DAMmaya_tab2"`; string $scroll2 = `scrollLayout -w 581 -h 492 -childResizable true -minChildWidth 368 -hst 16 -vst 16 "DAMmaya_tab2_scroll"`; gridLayout -numberOfColumns 3 -numberOfRows 3 -cellWidthHeight 184 166 -columnsResizable true -autoGrow true -aec true "DAMmaya_tab2_compareView"; setParent ..; setParent ..; formLayout -edit -attachForm $scroll2 "top" 0 -attachForm $scroll2 "left" 0 -attachForm $scroll2 "bottom" 0 -attachForm $scroll2 "right" 0 $tab2; setParent ..; string $tab3 = `formLayout "DAMmaya_tab3"`; string $webBrowser = `webBrowser -url "www.fusionbox.co.uk/DAMM/index.htm"`; formLayout -edit -attachForm $webBrowser "top" 0 -attachForm $webBrowser "left" 0 -attachForm $webBrowser "bottom" 0 -attachForm $webBrowser "right" 0 $tab3; setParent ..; tabLayout -edit -tabLabel $tab1 "File View" -tabLabel $tab2 "Version Comparison" -tabLabel $tab3 "About" $tabs; showWindow $window; } //Callback procedure for when a directory is selected using the browser //--------------------------------------------------------------------- proc int onSelect(string $dirpath, string $type) { if (!(`filetest -d $dirpath`)) textField -e -tx "The selection must be a directory" "statusBar"; else { textField -e -tx $dirpath "dirPathName"; showThumbs(0); return true; } } //Procedure to create directories for thumbnailing and versioning //--------------------------------------------------------------- proc setupDir() { string $path = `textField -q -tx "dirPathName"`; if (!(`filetest -d $path`)) textField -e -tx "The selected directory does not exist" "statusBar"; else { string $RCSDir = $path + "RCS"; string $thumbsDir = $path + "DAMthumbs"; string $compareDir = $path + "DAMthumbs/compare"; if (!(`filetest -d $RCSDir`)) sysFile -md $RCSDir; else textField -e -tx "An RCS directory already exists at this location" "statusBar"; if (!(`filetest -d $thumbsDir`)) sysFile -md $thumbsDir; else textField -e -tx "A DAMthumbs directory already exists at this location" "statusBar"; if (!(`filetest -d $compareDir`)) sysFile -md $compareDir; else textField -e -tx "A compare directory already exists at this location" "statusBar"; } } //Procedure to either display existing thumbnails, or create new ones //------------------------------------------------------------------- proc showThumbs(int $refresh) { string $path = `textField -q -tx "dirPathName"`; if (!(`filetest -d $path`)) textField -e -tx "The selected directory does not exist" "statusBar"; else { if (!(`filetest -d ($path + "DAMthumbs")`)) textField -e -tx "There is no thumbnail directory at this location" "statusBar"; else { if ($refresh == 1 && size(`gridLayout -q -ca "DAMmaya_tab1_thumbView"`) > 0) { deleteUI -lay (`gridLayout -q -ca "DAMmaya_tab1_thumbView"`); string $thumbList[] = `getFileList -fld ($path + "DAMthumbs/") -fs "*.iff"`; int $i; for ($i = 0; $i < size($thumbList); $i++) { sysFile -del ($path + "DAMthumbs/" + $thumbList[$i]); } } string $fileListMA[] = `getFileList -fld $path -fs "*.ma"`; string $fileListMB[] = `getFileList -fld $path -fs "*.mb"`; string $fileListRCS[] = `getFileList -fld ($path + "RCS/")`; if (size($fileListMA) == 0) textField -e -tx "No Maya ascii files found" "statusBar"; if (size($fileListMB) == 0) textField -e -tx "No Maya binary files found" "statusBar"; if (size($fileListRCS) == 0) textField -e -tx "No files found in RCS directory" "statusBar"; //Check whether there is a checked out version of a file in the RCS directory: //if so, do not include the RCS version of the file. int $i; for ($i = 0; $i < size($fileListRCS); $i++) { $fileListRCS[$i] = `substring $fileListRCS[$i] 1 (size($fileListRCS[$i])-2)`; } if ((size($fileListMA)!=0) || (size($fileListMB)!=0) || (size($fileListRCS)!=0)) { string $fileListMAMB[] = stringArrayCatenate($fileListMA, $fileListMB); string $fileListAll[] = stringArrayCatenate($fileListMAMB, $fileListRCS); thumbButton($fileListAll, $refresh); } else{} } } } //Procedure to make buttons from thumbnails //----------------------------------------- proc thumbButton(string $fileList[], int $refresh) { string $path = `textField -q -tx "dirPathName"`; string $thumbName; string $file; string $buttonName; string $renderFileList[]; string $thumbLabel; int $i, $rflCount = 0, $fileCheck, $RCSFileCheck, $pipe; //Check whether a thumbnail exists for a file in the list: //if not, add that file to the list of files to be rendered. for ($i = 0; $i < size($fileList); $i++) { $file = $fileList[$i]; $thumbName = $path + "DAMthumbs/"; $thumbName += `substring $file 1 (size($file)-3)`; $thumbName += ".iff"; if (!(`filetest -r $thumbName`) || $refresh) { $renderFileList[$rflCount] = $fileList[$i]; $rflCount++; } } //If there are files to be rendered, open a pipe to a Maya prompt and proceed: //working files take priority over their RCS versioned counterparts if they exist. if (size($renderFileList) > 0) { $pipe = popen("maya -prompt -noAutoloadPlugins", "w"); if ($pipe) { waitCursor -state on; for ($i = 0; $i < size($renderFileList); $i++) { $isInRCS = `filetest -r ($path + "RCS/" + $renderFileList[$i] + ",v")`; $isInPath = `filetest -r ($path + $renderFileList[$i])`; if ($isInRCS && !($isInPath)) { $RCSFileCheck = 1; checkOutFile(($path + $renderFileList[$i]), "last", 0); } else $RCSFileCheck = 0; renderFile($renderFileList[$i], $pipe); if ($RCSFileCheck) fprint $pipe ("system(\"rcsclean " + $path + $renderFileList[$i] + "\");"); } fprint $pipe "quit -force;"; pclose($pipe); waitCursor -state off; //Clear the status bar if everything worked textField -e -tx "" "statusBar"; } else textField -e -tx "Error: failed to open render pipe" "statusBar"; } //Create the frames and load the images for each thumbnail, an assign each a menu for ($i = 0; $i < size($fileList); $i++) { $RCSFileCheck = 0; $file = $fileList[$i]; $thumbName = $path + "DAMthumbs/"; $thumbName += `substring $file 1 (size($file)-3)`; $thumbName += ".iff"; $buttonName = substituteAllString($thumbName, "/", "_"); $buttonName = substituteAllString($buttonName, ".", "_"); $buttonName = `substring $buttonName 2 (size($buttonName))`; $RCSFileCheck = `filetest -r ($path + "RCS/" + $file + ",v")`; $fileCheck = `filetest -r ($path + $file)`; if (`frameLayout -ex $buttonName`) { if ($refresh || (!($fileCheck) && !($RCSFileCheck))) deleteUI -lay $buttonName; } if (!(`frameLayout -ex $buttonName`) && ($fileCheck || $RCSFileCheck)) { if ($RCSFileCheck) $thumbLabel = ("RCS:" + $file); else $thumbLabel = $file; setParent "DAMmaya_tab1_thumbView"; frameLayout -l $thumbLabel -la "bottom" -bs "etchedOut" -w 184 -h 166 $buttonName; if (!(`filetest -r $thumbName`)) text -label "File could not be read" -al "center" -w 180 -h 144; else { image -width 180 -height 144 -image $thumbName; string $popupMenu = `popupMenu -markingMenu 1`; popupMenu -e -postMenuCommand ("menuSetup(\"" + $file + "\", \"" + $popupMenu + "\")") $popupMenu; } } } } //Procedure to setup the menu of each thumbnail according to the state of the file //-------------------------------------------------------------------------------- proc menuSetup(string $file, string $popupMenu) { string $path = `textField -q -tx "dirPathName"`; string $versionList[]; string $verToken[]; string $locked; int $i, $RCSFileCheck, $fileCheck, $fileCheckWrite; $fileCheck = `filetest -r ($path + $file)`; $fileCheckWrite = `filetest -w ($path + $file)`; $RCSFileCheck = `filetest -r ($path + "RCS/" + $file + ",v")`; popupMenu -e -deleteAllItems $popupMenu; setParent -menu $popupMenu; if ($fileCheck) menuItem -l "Open" -radialPosition "N" -command ("openFile(\"" + $path + $file + "\")"); if ($RCSFileCheck) { menuItem -l "Info" -radialPosition "SW" -command ("infoFile(\"" + $path + $file + "\")"); $versionList = getVers($path, $file); menuItem -l "Check out" -radialPosition "NW" -subMenu true; menuItem -l "Versions"; menuItem -divider true; for ($i = 0; $i < size($versionList); $i++) { tokenize $versionList[$i] $verToken; if ($verToken[1] == "locked") menuItem -l ($verToken[0] + " (l)") -subMenu true; else menuItem -l ($verToken[0]) -subMenu true; menuItem -l "Read only" -command ("checkOutFile(\"" + $path + $file + "\", \"" + ($verToken[0]) + "\", 0)"); if ($verToken[1] == "locked") menuItem -l "Break lock" -command ("system(\"rcs -u" + $verToken[0] + " " + $path + $file + "\")"); else menuItem -l "Editable" -command ("checkOutFile(\"" + $path + $file + "\", \"" + ($verToken[0]) + "\", 1)"); setParent -m ..; } setParent -m ..; menuItem -l "Compare Versions" -radialPosition "S" -command ("compareFile(\"" + $file + "\")"); } if ($fileCheck && $fileCheckWrite) menuItem -l "Check in" -radialPosition "NE" -command ("checkInFile(\"" + $path + $file + "\")"); else if ($fileCheck && !($fileCheckWrite)) menuItem -l "Clean" -radialPosition "NE" -command ("system(\"rcsclean " + $path + $file + "\")"); menuItem -l "Refresh" -radialPosition "SE" -command ("thumbButton({\"" + $file + "\"}, 1)"); } //Procedure to execute when a file save has been detected //------------------------------------------------------- //proc saveFile() //{ // // //Defunct: doesn't work with scriptJob to catch file save // //} //Procedure to execute when opening a file from the thumbnail menu //---------------------------------------------------------------- proc openFile(string $file) { string $currentFile = `file -q -shortName -sceneName`; int $result = `pDAMsaveChanges("file -force -open \"" + $file + "\"")`; //If file was saved, render new thumbnail if ($result == 2) thumbButton({$currentFile}, 1); } //Procedure to check a file out of the RCS directory //-------------------------------------------------- proc checkOutFile(string $file, string $version, int $write) { string $confirm = "Yes"; int $fileTest = `filetest -r $file`; if ($fileTest) { $confirm = `confirmDialog -title "Working file exists" -message "Do you want to overwrite the working file?" -button "Yes" -button "No" -defaultButton "No" -cancelButton "No" -dismissString "No"`; } if ($confirm == "Yes") { if ($fileTest) system("rm -f " + $file); if ($write) { if ($version != "last") system("co -l -r" + $version + " " + $file); else system("co -l " + $file); } else { if ($version != "last") system("co -r" + $version + " " + $file); else system("co " + $file); } } else textField -e -tx "File not checked out" "statusBar"; } //Procedure to check a file in to the RCS directory //------------------------------------------------- proc checkInFile(string $file) { if (`windowPref -ex "checkInWin"`) windowPref -r "checkInWin"; if (`window -ex "checkInWin"`) deleteUI -wnd "checkInWin"; string $path = `textField -q -tx "dirPathName"`; string $log; string $message; string $fileToken[]; tokenize $file "/" $fileToken; int $alreadyRCS = `filetest -r ($path + "RCS/" + $fileToken[size($fileToken)-1] + ",v")`; if (!($alreadyRCS)) $message = "First check in for this file: enter a file description."; else $message = "Enter log message here if this version is different to the stored one."; string $win = `window -title ("Check in log: " + $file) -w 500 -h 300 -sizeable false "checkInWin"`; string $form = `formLayout`; string $description = `text -l $message`; string $log = `scrollField -ww true "checkInLog"`; string $submit = `button -l "Check in" -w 100 -command ("checkInProc(\"" + $file + "\")")`; string $cancel = `button -l "Cancel" -w 100 -command ("deleteUI -wnd " + $win + ";")`; formLayout -edit -attachForm $description "top" 0 -attachForm $description "left" 0 -attachNone $description "bottom" -attachForm $description "right" 0 -attachControl $log "top" 0 $description -attachForm $log "left" 0 -attachControl $log "bottom" 0 $submit -attachForm $log "right" 0 -attachNone $submit "top" -attachNone $submit "left" -attachForm $submit "bottom" 0 -attachControl $submit "right" 0 $cancel -attachNone $cancel "top" -attachNone $cancel "left" -attachForm $cancel "right" 0 -attachForm $cancel "bottom" 0 $form; setParent ..; showWindow $win; } proc checkInProc(string $file) { string $command; int $pipe; $pipe = popen(("ci " + $file), "w"); if ($pipe) { //Use the message entered by the user as the version log string $logMessage = (`scrollField -q -tx "checkInLog"`); if (size($logMessage) > 0) fprint $pipe ($logMessage + "\n"); else fprint $pipe "."; pclose($pipe); string $filename[]; tokenize $file "/" $filename; thumbButton({$filename[size($filename)-1]}, 1); } else textField -e -tx "Error: Failed to open pipe" "statusBar"; deleteUI -wnd "checkInWin"; } //Procedure to retrieve file information using rlog //------------------------------------------------- proc infoFile(string $file) { string $infoString; int $pipe; $pipe = popen(("rlog " + $file), "r"); if ($pipe) { string $nextLine = `fgetline $pipe`; while (size($nextLine) > 0) { $infoString += $nextLine; $nextLine = `fgetline $pipe`; } pclose($pipe); } else textField -e -tx "Error: Failed to open pipe" "statusBar"; if (`windowPref -ex "infoWin"`) windowPref -r "infoWin"; if (`window -ex "infoWin"`) deleteUI -wnd "infoWin"; $win = `window -title ($file + " info") -w 500 -h 300 -sizeable false "infoWin"`; string $form = `formLayout`; string $info = `scrollField -ed false -ip 1 -ww true -tx $infoString`; formLayout -edit -attachForm $info "top" 0 -attachForm $info "left" 0 -attachForm $info "bottom" 0 -attachForm $info "right" 0 $form; setParent ..; showWindow $win; } //Procedure for retrieving version list, and whether a file is locked //------------------------------------------------------------------- proc string[] getVers(string $path, string $file) { string $versionList[]; string $verToken[]; int $versionCount = 0, $pipe; $pipe = popen("rlog " + $path + $file + " | egrep \"revision \" | sed -e \"s/revision //\"", "r"); if ($pipe) { string $nextLine = `fgetline $pipe`; while (size($nextLine) > 0) { $nextLine = `substitute "\n" $nextLine ""`; tokenize $nextLine $verToken; if ($verToken[1] == "locked") $versionList[$versionCount] = ($verToken[0] + " " + $verToken[1]); else $versionList[$versionCount] = $verToken[0]; $nextLine = `fgetline $pipe`; $versionCount++; } pclose($pipe); } else textField -e -tx "Error: Failed to open pipe" "statusBar"; return $versionList; } //Procedure for comparing file versions //------------------------------------- proc compareFile(string $file) { string $path = `textField -q -tx "dirPathName"`; string $versionList[]; string $verToken[]; string $workingFileCheck; string $workingFileHolder; string $newFile; string $oldFile; string $ver; string $locked; int $i, $pipe; $versionList = getVers($path, $file); $pipe = popen("maya -prompt -noAutoloadPlugins", "w"); if ($pipe) { //If there are comparison thumbnails already displayed, remove them if (size(`gridLayout -q -ca "DAMmaya_tab2_compareView"`) > 0) deleteUI -lay (`gridLayout -q -ca "DAMmaya_tab2_compareView"`); waitCursor -state on; $workingFileCheck = `filetest -r ($path + $file)`; //If there is a working version of the file in the directory, rename it temporarily //temporarily to prevent it from being overwritten if ($workingFileCheck) { $workingFileHolder = (`substring $file 1 (size($file)-3)`) + "_working"; $workingFileHolder += `substring $file (size($file)-2) (size($file))`; sysFile -rename ($path + $workingFileHolder) ($path + $file); } //Check out each version of the file as read-only and render it. If the version has //already been checked out, give an indication of whether it is locked. for ($i = (size($versionList) - 1); $i >= 0; $i--) { tokenize $versionList[$i] $verToken; fprint $pipe ("system(\"co -r" + $verToken[0] + " " + $path + $file + "\");"); renderFile($file, $pipe); $ver = substituteAllString($verToken[0], ".", "_"); $newFile = ($path + "DAMthumbs/compare/" + (`substring $file 1 (size($file)-3)`) + "_" + $ver + ".iff"); $oldFile = ($path + "DAMthumbs/" + (`substring $file 1 (size($file)-2)`) + "iff"); fprint $pipe ("sysFile -rename \"" + $newFile + "\" \"" + $oldFile + "\";"); if ($verToken[1] == "locked") $locked = "(l)"; else $locked = ""; setParent "DAMmaya_tab2_compareView"; frameLayout -l ($file + " v" + $verToken[0] + " " + $locked) -la "bottom" -bs "etchedOut" -w 184 -h 166; image -width 180 -height 144 -image $newFile; } //Rename the working file back to the original name if ($workingFileCheck) { fprint $pipe ("sysFile -rename \"" + ($path + $file) + "\" \"" + ($path + $workingFileHolder) + "\";"); renderFile($file, $pipe); $newFile = ($path + "DAMthumbs/" + (`substring $file 1 (size($file)-2)`) + "iff"); setParent "DAMmaya_tab2_compareView"; frameLayout -l ($file + " : working") -la "bottom" -bs "etchedOut" -w 184 -h 166; image -width 180 -height 144 -image $newFile; } else fprint $pipe ("system(\"rcsclean " + $path + "*\");"); fprint $pipe "quit -force;"; pclose($pipe); waitCursor -state off; //Clear the status bar if everything worked textField -e -tx "" "statusBar"; } else textField -e -tx "Error: Failed to open render pipe" "statusBar"; } //Procedure to render files for thumbnailing //------------------------------------------ proc renderFile(string $file, int $pipe) { string $path = `textField -q -tx "dirPathName"`; if (!(`filetest -d $path`)) textField -e -tx "The selected directory does not exist" "statusBar"; else { //Force open file fprint $pipe ("file -f -o \"" + $path + $file + "\";"); //Set render globals to correct image format and disable animation to create thumbnails fprint $pipe ("setAttr defaultRenderGlobals.imageFormat 7; setAttr defaultRenderGlobals.animation false;"); string $renderMessage = "Rendering thumbnail of " + $file; textField -e -tx $renderMessage "statusBar"; //Render (hardware/software), get image file name if (`radioButtonGrp -q -sl "rendererSelect"` != 1) fprint $pipe "string $outImage = `render -x 180 -y 144 -nsh 0 -ngl 0 persp`;"; else { fprint $pipe "hwRender -cf -w 180 -h 144 -eaa 0 1 -lql -cam persp;"; fprint $pipe ("string $outImage = (`workspace -q -rd` + \"images/\" + (`hwRender -imageFileName`));"); } //Move file to thumbnail directory fprint $pipe "string $newName = `file -q -shortName -sceneName`; $newName = `substring $newName 1 (size($newName)-3)`;"; fprint $pipe ("sysFile -rename (\"" + $path + "/DAMthumbs/\" + $newName + \".iff\") ($outImage);"); } } //Custom file saving procedure, indicates whether a thumbnail needs updating //-------------------------------------------------------------------------- proc int pDAMsaveChanges (string $saveChangeAction) { string $fileName; string $result; int $returnValue = 1; if (`file -q -amf`) { $fileName = `file -q -sceneName`; if ($fileName != "") { string $confirmMessage = ("Save changes to " + $fileName + "?"); $result = `confirmDialog -title "Save Changes" -message $confirmMessage -button "Save" -button "Don't Save" -button "Cancel" -defaultButton "Save"`; if ($result == "Save") { int $catchSave = catch(`file -save`); if ($catchSave == 0) $returnValue = 2; else $returnValue = 0; } else if ($result == "Cancel") $returnValue = 0; } else { $result = `confirmDialog -title "Warning: Scene not saved." -message ("Save changes to untitled scene?") -button "Save" -button "Don't Save" -button "Cancel" -defaultButton "Save"`; switch ($result) { case "Save": projectViewer "SaveAs"; $returnValue = 2; break; case "Don't Save": $returnValue = 1; break; case "Cancel": $returnValue = 0; break; } } } if ($returnValue == 1 || $returnValue == 2) { if (`pluginInfo -q -loaded "mayalive"`) if (`exists mlResetAllDeletable`) mlResetAllDeletable; evalEcho($saveChangeAction); } return $returnValue; } DAMmaya();