MetaFusion/Reference/SuperRiggingEditor/scripts/SGBatchDelBlendShape.mel
2025-02-03 22:58:41 +08:00

25 lines
753 B
Plaintext

//******************************************************************************
//
// 版权所有: 玉溪时光科技有限公司
// 联系邮箱: q.100@qq.com
// 开发日期: 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;
}
}
}
}
}