MetaFusion/Reference/SuperRiggingEditor/scripts/SGRangeBlendShapeSelect.mel

32 lines
970 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>: 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;
}