MetaFusion/Reference/SuperRiggingEditor/scripts/SGBatchDelBlendShape.mel

25 lines
753 B
Plaintext
Raw 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/09/24
//
//******************************************************************************
global proc SGBatchDelBlendShape (int $lod, string $meshes[]){
int $mesheIndices[] = `SGGetMeshes -lod $lod`;
for ($mesheIndex in $mesheIndices) {
string $meshe = `SGGetMeshes -m $mesheIndex`;
if(`objExists $meshe`){
string $lod_meshe = `SGGetMeshes -i $mesheIndex`;
string $head = `match "[^_]+" $lod_meshe`;
if(stringArrayContains($head, $meshes)){
string $blendShape = $lod_meshe + "_blendShapes";
if(`objExists $blendShape`){
delete $blendShape;
}
}
}
}
}