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

23 lines
749 B
Plaintext

//******************************************************************************
//
// 版权所有: 玉溪时光科技有限公司
// 联系邮箱: q.100@qq.com
// 开发日期: 2023/08/08
//
//******************************************************************************
global proc SGResetTarget (int $targetIds[], string $blendShape){
select -cl;
for($targetId in $targetIds){
string $target[] = `sculptTarget -e -regenerate true -target $targetId $blendShape`;
string $shape[] = `listRelatives -s $target[0]`;
int $vtxs[] = `polyEvaluate -v $target[0]`;
for($i=0; $i<$vtxs[0]; $i++){
setAttr ($shape[0]+".pnts["+$i+"].pntx") 0;
setAttr ($shape[0]+".pnts["+$i+"].pnty") 0;
setAttr ($shape[0]+".pnts["+$i+"].pntz") 0;
}
delete $target;
}
}