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

21 lines
689 B
Plaintext

//******************************************************************************
//
// 版权所有: 玉溪时光科技有限公司
// 联系邮箱: q.100@qq.com
// 开发日期: 2023/08/08
//
//******************************************************************************
global proc SGCopySkin (){
string $meshes[]=`ls -sl`;
string $joints[]=`skinCluster -q -inf $meshes[0]`;
for($i=1;$i<size($meshes);$i++){
string $skinCluster = `findRelatedSkinCluster $meshes[$i]`;
if(`objExists $skinCluster`){
skinCluster -e -ub $meshes[$i];
}
skinCluster $joints $meshes[$i];
copySkinWeights -noMirror -surfaceAssociation closestPoint -influenceAssociation closestJoint $meshes[0] $meshes[$i];
}
}