//****************************************************************************** // // 版权所有: 玉溪时光科技有限公司 // 联系邮箱: q.100@qq.com // 开发日期: 2023/08/08 // //****************************************************************************** global proc SGResetBlendShapes (){ for($j = 0; $j < 50; $j++ ){ string $meshe = `SGGetMeshes -i $j`; string $blendShape = ($meshe + "_blendShapes"); if(`objExists $blendShape`){ string $attrWeight = $blendShape + ".weight"; string $currentBlendShapeList[] = `listAttr -m $attrWeight`; for($i = 0; $i < size($currentBlendShapeList); $i++ ){ string $bsName = $currentBlendShapeList[$i]; if(`gmatch $bsName ($meshe + "__*")`){ string $prefixToRemove = $meshe + "__"; $bsName = `substituteAllString $bsName $prefixToRemove ""`; catchQuiet (`aliasAttr $bsName ($blendShape + ".w[" + $i + "]")`); } } } } }