# 常用篇
//change all texture files's folder in a scene
{
string $ts[] = `ls -tex`;
for($one in $ts){
if(attributeExists("filename",$one)){
string $filename = `getAttr ($one + ".filename")`;
print ($filename+" changed to ");
string $buffer[];
$number=`tokenize $filename "//" $buffer`;
$filename = "e:/tif/"+$buffer[$number-1];
setAttr ($one+".filename") -type "string" $filename;
print($filename+"\n");
}
}
};
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15