39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
//******************************************************************************
|
|
//
|
|
// 版权所有: 玉溪时光科技有限公司
|
|
// 联系邮箱: q.100@qq.com
|
|
// 开发日期: 2023/08/08
|
|
//
|
|
//******************************************************************************
|
|
|
|
global proc SGTransferMaps (){
|
|
for($i=1;$i<8;$i++){
|
|
int $meshIndexs[] = `SGGetMeshes -lod $i`;
|
|
for($j=0;$j<9;$j++){
|
|
string $mesh = `SGGetMeshes -m $j`;
|
|
if(`objExists $mesh`){
|
|
string $buffer[];
|
|
tokenize $mesh "_" $buffer;
|
|
string $type = $buffer[0];
|
|
for($m=0;$m<size($meshIndexs);$m++){
|
|
string $lodMesh = `SGGetMeshes -i $meshIndexs[$m]`;
|
|
if(`gmatch $lodMesh ($type+"*")`){
|
|
string $lod = `SGGetMeshes -m $meshIndexs[$m]`;
|
|
transferShadingSets -sampleSpace 0 -searchMethod 3 $mesh $lod;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
string $body = `SGGetMeshes -m 50`;
|
|
if(`objExists $body`){
|
|
for($i=1;$i<4;$i++){
|
|
int $bodyIndex = 50 + $i;
|
|
string $lod = `SGGetMeshes -m $bodyIndex`;
|
|
transferShadingSets -sampleSpace 0 -searchMethod 3 $body $lod;
|
|
}
|
|
}
|
|
}
|
|
|
|
|