31 lines
867 B
Plaintext
31 lines
867 B
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>: 2024/03/26
|
|||
|
//
|
|||
|
//******************************************************************************
|
|||
|
|
|||
|
global proc SGFastBindSkinCluster (){
|
|||
|
for($i=0; $i<54; $i++){
|
|||
|
string $mesh = `SGGetMeshes -m $i`;
|
|||
|
if(`objExists $mesh`){
|
|||
|
string $path = `SGDescriptor -p` + "/skin_buffer/";
|
|||
|
if(`file -q -ex $path`){
|
|||
|
string $skinFileList[] = `getFileList -fld $path -fs "*.skin"`;
|
|||
|
for($skin in $skinFileList){
|
|||
|
if(`gmatch $skin ("*"+$mesh+"*")`){
|
|||
|
string $skinFile = $path + $skin;
|
|||
|
string $skinCluster = `findRelatedSkinCluster $mesh`;
|
|||
|
if(`objExists $skinCluster`){
|
|||
|
skinCluster -e -ub $mesh;
|
|||
|
}
|
|||
|
catchQuiet (`SGSkinCluster -if $mesh $skinFile`);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
|