36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
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 SGCreateBlendShape (){
|
|||
|
SGProgressBar -sp;
|
|||
|
for($mesheIndex=0; $mesheIndex<50; $mesheIndex++){
|
|||
|
string $mesh = `SGGetMeshes -m $mesheIndex`;
|
|||
|
if(`objExists $mesh`){
|
|||
|
string $blendShape = `SGGetBlendShape $mesh`;
|
|||
|
int $count = `SGGetBlendShapes -dr "r" -tc $mesheIndex`;
|
|||
|
if(!`objExists $blendShape` && $count > 0){
|
|||
|
string $blendShapeName = `SGGetMeshes -i $mesheIndex` + "_blendShapes";
|
|||
|
SGProgressBar -max $count;
|
|||
|
SGProgressBar -t ("[" + $blendShapeName + "] Creating Target Mesh...");
|
|||
|
blendShape -n $blendShapeName $mesh;
|
|||
|
for($index=0; $index<$count; $index++){
|
|||
|
SGProgressBar -apr 1;
|
|||
|
string $bsName = `SGGetBlendShapes -dr "r" -bsn $mesheIndex $index`;
|
|||
|
duplicate -rr -n $bsName $mesh;
|
|||
|
SGSetBlendShapes -ct $mesheIndex $index $bsName;
|
|||
|
blendShape -e -tc on -t $mesh $index $bsName 1 -w $index 0 $blendShapeName;
|
|||
|
delete $bsName;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
SGProgressBar -ep;
|
|||
|
}
|
|||
|
|
|||
|
|