MetaFusion/Reference/SuperRiggingEditor/scripts/SGSaveBlendShape.mel

36 lines
996 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>: 2023/08/08
//
//******************************************************************************
global proc SGSaveBlendShape (){
SGSaveBlendShapeMappings 0;
SGProgressBar -sp;
for($meshIndex=0; $meshIndex<50; $meshIndex++){
string $mesh = `SGGetMeshes -m $meshIndex`;
if(`objExists $mesh`){
string $blendShape = `SGGetBlendShape $mesh`;
if(`objExists $blendShape`){
int $count = `blendShape -q -wc $blendShape`;
if($count){
SGProgressBar -max $count;
SGProgressBar -t ("[" + $blendShape + "] Save Target Mesh...");
for($index=0; $index<$count; $index++){
SGProgressBar -apr 1;
string $bsName[] = `sculptTarget -e -regenerate true -target $index $blendShape`;
SGSaveBlendShapes -bs $meshIndex $index $bsName[0];
delete $bsName;
}
}
}
}
}
SGProgressBar -ep;
}