24 lines
792 B
Plaintext
24 lines
792 B
Plaintext
//******************************************************************************
|
|
//
|
|
// 版权所有: 玉溪时光科技有限公司
|
|
// 联系邮箱: q.100@qq.com
|
|
// 开发日期: 2024/02/23
|
|
//
|
|
//******************************************************************************
|
|
|
|
global proc SGRepairJointForLOD(int $lod){
|
|
int $joints[] = `SGGetJoints -lod $lod "int"`;
|
|
for($i=0; $i<size($joints); $i++){
|
|
int $index = $joints[$i];
|
|
string $joint = `SGGetJoints -i $index`;
|
|
if(!`objExists $joint`){
|
|
joint -p 0 0 0 -n $joint;
|
|
string $parent = `SGGetJoints -p $index`;
|
|
catchQuiet (`parent $joint $parent`);
|
|
float $pos[] = `SGGetNeutralJointTranslations -i $index`;
|
|
setAttr -type float3 ($joint+".t") $pos[0] $pos[1] $pos[2];
|
|
setAttr -type float3 ($joint+".jo") $pos[3] $pos[4] $pos[5];
|
|
}
|
|
}
|
|
}
|