23 lines
749 B
Plaintext
23 lines
749 B
Plaintext
|
//******************************************************************************
|
|||
|
//
|
|||
|
// <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 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;
|
|||
|
}
|
|||
|
}
|