39 lines
1.0 KiB
Plaintext
39 lines
1.0 KiB
Plaintext
|
//******************************************************************************
|
|||
|
//
|
|||
|
// <20><>Ȩ<EFBFBD><C8A8><EFBFBD><EFBFBD>: <20><>Ϫʱ<CFAA><CAB1><EFBFBD>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD><EFBFBD>˾
|
|||
|
// <20><>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>: q.100@qq.com
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: 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;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|