accomplished.\ } } else FTM_Log \specified threshold, skipped!\ } } progressWindow -ep; FTM_Log \ FTM_END; waitCursor -state off; } }
////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////// //
// Command to substitute path root //
global proc FTM_Substitute(string $oldRootField, string $newRootField) {
string $oldRoot = `textFieldButtonGrp -q -text $oldRootField`; $oldRoot = substituteAll(\
string $newRoot = `textFieldButtonGrp -q -text $newRootField`; $newRoot = substituteAll(\if (size($oldRoot)==0 || size($newRoot)==0) confirmDialog -t \must be filled!\else { string $fileNodes[] = `ls -sl -typ file -typ mentalrayTexture -typ psdFileTex`; if (`FTM_SelCheck $fileNodes`){ waitCursor -state 1; FTM_Log \ // substitute all special characters string $badChar[] = {\ for ($char in $badChar) $oldRoot = `substituteAllString $oldRoot $char (\ string $node; int $progress = 0; int $percentage = 0; progressWindow -t \
for ($i=0;$i ////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////// // // Command executed when \// global proc FTM_AnalyseFileTextures (string $FTM_ParentUI) { waitCursor -state on; string $FTM_Groups[] = `FTM_FileTextureAnalyst`; // Make sure the corresponding UI uniqe. if (`columnLayout -q -ex ($FTM_ParentUI + \ deleteUI ($FTM_ParentUI + \ if (size($FTM_Groups) == 0) text -e -l \ else { text -e -l \ setParent $FTM_ParentUI; columnLayout FTM_AnalysisCheckerColumn; int $FTM_Groups_Size = size($FTM_Groups); if ($FTM_Groups[0] == \ $FTM_Groups_Size -= 1; if ($FTM_Groups[1] == \ $FTM_Groups_Size -= 1; global string $lsCmd; string $FTM_TotalResults = \$FTM_Groups_Size + \ text -l $FTM_TotalResults; text -l \ // Analyse each file in each \ for ($FTM_Group in $FTM_Groups) { string $buffer[]; tokenize $FTM_Group \ int $FTM_FilesStoredSize = size ($buffer)-1; string $FTM_CurrentPath = $buffer[0]; string $FTM_FileTexturesAnalysis; // File texture not specified yet. In other words, empty file texture nodes. if ($FTM_CurrentPath==\&& $FTM_FilesStoredSize>0) $FTM_FileTexturesAnalysis = $FTM_FilesStoredSize + \texture(s) NOT specified. So they are NOT exist(s).\ // File texture specified, but no path information. else if ($FTM_CurrentPath==\&& $FTM_FilesStoredSize>0) $FTM_FileTexturesAnalysis = $FTM_FilesStoredSize + \path information. So they are NOT exist(s).\ // Normal status. else { if ($FTM_FilesStoredSize>0){ // Correct the path format for current OS. $FTM_CurrentPath = `FTM_GetPath \ $FTM_FileTexturesAnalysis = $FTM_FilesStoredSize + \texture(s) point to \\\ } } // Queue the names of the files stored in current \ string $FTM_CurrentFile[]; string $FTM_CurrentFiles = \ // Strings used to hold files exist or notExist. string $FTM_Exist[] = {}; int $FTM_ExistSize = 0; string $FTM_NotExist[] = {}; int $FTM_NotExistSize = 0; for ($i=1; $i // Only build responding sub-checker for the files have path information. string $FTM_ExistSubChecker; string $FTM_NotExistSubChecker; if ($FTM_CurrentPath!=\ && $FTM_CurrentPath!=\ { columnLayout -adj 1 -cat left 30; // A list of exist files, which is used for selection. string $FTM_ExistFiles = \ for ($i=0; $i<$FTM_ExistSize; $i++) $FTM_ExistFiles = $FTM_ExistFiles + $FTM_Exist[$i] + \ $FTM_ExistSubChecker = `checkBox -l ($FTM_ExistSize + \of them exist(s).\ -onc (\-add \+ $FTM_ExistFiles) -ofc (\(\+ $FTM_ExistSize + \ // A list of NOT exist files, which is used for selection. string $FTM_NotExistFiles = \ for ($i=0; $i<$FTM_NotExistSize; $i++) $FTM_NotExistFiles = $FTM_NotExistFiles + $FTM_NotExist[$i] + \ $FTM_NotExistSubChecker = `checkBox -l ($FTM_NotExistSize + \ -onc (\-add \+ $FTM_NotExistFiles) -ofc (\(\+ $FTM_NotExistSize + \ setParent ($FTM_ParentUI + \ // Main checker's onCommand and offCommand should influnce responding subcheckers in this case; checkBox -e -onc (\-v 1 -vis 0 \+ $FTM_ExistSubChecker + \-e -v 1 -vis 0 \+ $FTM_NotExistSubChecker) -ofc (\(\+ $FTM_FilesStoredSize + \> 0) select -deselect \+ $FTM_CurrentFiles + \-vis 1 \ $FTM_MainChecker; } // Main checker's onCommand and offCommand should NOT influnce responding subcheckers in this case; else checkBox -e -onc (\-add \+ $FTM_CurrentFiles) -ofc (\(\+ $FTM_FilesStoredSize + \ }