MetaFusion/Reference/SuperRiggingEditor/scripts/SGFastUnbindSkinCluster.mel

28 lines
722 B
Plaintext
Raw Permalink Normal View History

2025-02-03 22:58:41 +08:00
//******************************************************************************
//
// <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 SGFastUnbindSkinCluster (){
for($i=0; $i<54; $i++){
string $mesh = `SGGetMeshes -m $i`;
if(`objExists $mesh`){
string $skinCluster = `findRelatedSkinCluster $mesh`;
if(`objExists $skinCluster`){
string $path = `SGDescriptor -p` + "/skin_buffer/";
string $skinFile = $path + $mesh + ".skin";
if(!`file -q -ex $path`){
sysFile -md $path;
}
SGSkinCluster -ef $mesh $skinFile;
skinCluster -e -ub $mesh;
}
}
}
}