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

32 lines
970 B
Plaintext

//******************************************************************************
//
// 版权所有: 玉溪时光科技有限公司
// 联系邮箱: q.100@qq.com
// 开发日期: 2023/08/08
//
//******************************************************************************
global proc SGRangeBlendShapeSelect (int $mesh[], int $target[], float $range){
int $count = size($mesh);
SGProgressBar -sp;
SGProgressBar -max $count;
for($i=0; $i<$count; $i++){
int $meshIndex = $mesh[$i];
int $targetIndex = $target[$i];
string $mesh = `SGGetMeshes -m $meshIndex`;
if(`objExists $mesh`){
string $blendShape = `SGGetBlendShape $mesh`;
if(`objExists $blendShape`){
string $bsName[] = `sculptTarget -e -regenerate true -target $targetIndex $blendShape`;
SGSetBlendShapes -r $range $bsName[0];
delete $bsName;
}
}
string $title = "[" + ($i+1) + "/" + $count + "]Select Target Mesh...";
SGProgressBar -t $title;
SGProgressBar -apr 1;
}
SGProgressBar -ep;
}