maya贴图路径找回脚本(4)

2019-01-10 13:14

else $isOneOfSeq[$i] = 1; } //commands to execute int $isMR_c = 0; //create .map file int $isMR_x = 0; //extract .map file if ($fileRegularName[2] == \ $isMR_x = 1; else if ($fileRegularName[2] != \ $isMR_c = 1; string $cmdFC = \ if ($isMR_c) $cmdFC += \ else if ($isMR_x) $cmdFC += \ else $cmdFC += \ string $cmdUpdatePath = \-typ \\\\+ $fileNodesList[$i] + \ string $cmdRemoveOrig = \ if (!$handleSeq && $isSeq[$i]) FTM_Log \ else { //else (2) // need to handle sequence textures if ($handleSeq && $isSeq[$i]){ string $padding = \ for ($j=0;$j

$cmdFC += \ else $cmdFC += \ // only do the convertion when target file doesn't exist, // or convertion has been done before for other file node that shares the same texture. if (`file -q -ex $fileUpdatePath`) FTM_Log \convertion has been done before.\ else{ //else (3) if (!$isSeq[$i]){ // system feedback string $cmdFCFeedback = eval($cmdFC); if (size($cmdFCFeedback)) FTM_Log \ if (`file -q -ex $fileUpdatePath`) FTM_Log \$fileFC + \ else FTM_Log \\\failed. Could be file permission problem, disk capacity problem or source texture is of unknown/unsupported format.\ } else { // for sequence, only print out command to execute. if (!$isMR_c && !$isMR_x) FTM_Log \\(\specified. Command to execute (format conversion):\ else FTM_Log \\\specified. Use \\\to convert your tetures. A simple loop might be needed.\ } }// else (3) // need to update path info if ($updatePath) {// if (1) $cmdUpdatePath += \+ \ $cmdRemoveOrig += encodeString($fileRemove) + \ if (!$isSeq[$i]){// if (2) if (`file -q -ex $fileUpdatePath`){ // if (3) if(catchQuiet(eval($cmdUpdatePath))) { FTM_Log \\\Attribute \\\ FTM_Log \\\Path updating failed. So

Original Texture Removing will not be done even if it was selected to.\ } else {// else (3) FTM_Log \\(%updating succeeded. Set to \\\+ (toNativePath($fileUpdatePath)) + \ // need to remove old textures // only remove old textures when updatePath is selected and updating succeeds if ($removeOrig){ //if (4) if ($isOneOfSeq[$i]) FTM_Log \\\one file of a whole sequence is used as texture, no file in the sequence is supposed to be removed.\ else if (!$isSeq[$i]){ // else if (1) if (!eval($cmdRemoveOrig)) FTM_Log \failed, could be file permission problem.\ else FTM_Log \\(\texture removing succeeded. Removed \\\ } // else if (1) } // if (4) }// else (3) } // if (3) else FTM_Log \Texture Removing will not be done even if they were selected to.\ } // if (2) // for sequence, only print out command to execute else { //else (4) FTM_Log \path info):\ if ($removeOrig) FTM_Log \\(\specified. Command to execute (remove original textures):\ }// else (4) } // if (1) } //else (2) } // else(1) } // for loop (1) // feedback ends if (!size($fileNodesList)) FTM_Log \

// build progress feedback only in UI mode if ($progressUI){ // finish progress feed back progressWindow -ep; FTM_Log \ // job done FTM_END; } waitCursor -state off; } // if (0) }

//////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// //

// analyse all possible file nodes to find out those match user's specification //

global proc string[] FTM_FCGetMatches (string $formatUI) {

string $fileNodesList[]; // list for file nodes to be handled

string $tmpNodesList[] = `ls -sl -typ file -typ mentalrayTexture`; // list for all (selected) file nodes, which need to be analyse.

if (`FTM_SelCheck $tmpNodesList`) { string $tmpNode; // each single file node in the list string $tmpFile; // file that $tmpNode point to. string $format = `optionMenu -q -v $formatUI`; if ($format!=\ for ($tmpNode in $tmpNodesList) { $tmpFile = `getAttr ($tmpNode + \ string $tmpFileRegularName[] = FTM_FCFileRegularName($tmpFile); if (tolower($tmpFileRegularName[2]) == tolower($format))// extension matches, this file node need to be handled $fileNodesList[size($fileNodesList)] = $tmpNode; } } else // \ $fileNodesList = $tmpNodesList; }

return $fileNodesList; }

/////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////

//

// info transfer, just to make sure FTM_FCGo can be run in command line. //

global proc FTM_FCGatherInfo(string $FTM_ExtraFunctionColumn) { string $sourceFormatUI = $FTM_ExtraFunctionColumn + \

string $targetFormat = `optionMenu -q -v ($FTM_ExtraFunctionColumn + \

int $handleSeq = `checkBox -q -v ($FTM_ExtraFunctionColumn + \int $updatePath = `checkBox -q -v ($FTM_ExtraFunctionColumn + \int $removeOrig = `checkBox -q -v ($FTM_ExtraFunctionColumn + \

FTM_FCGo 1 $sourceFormatUI $targetFormat $handleSeq $updatePath $removeOrig; }

////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////// //

// Command for Filter Setup //

global proc FTM_FilterSetup(string $FTM_ExtraFunctionColumn) {

string $Nodes[] = `ls -sl -typ file`; if (`FTM_SelCheck $Nodes`) { waitCursor -state on; FTM_Log \ int $filterType = `optionMenu -q -sl ($FTM_ExtraFunctionColumn+\ string $filter = `optionMenu -q -v ($FTM_ExtraFunctionColumn+\ int $progress = 0; int $percentage = 0; progressWindow -t \ for ($i=0;$i


maya贴图路径找回脚本(4).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:标准化党支部资料目录

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: