def copySkinComponents(source, destinationVerts):
if not mc.listRelatives(source, shapes=True):
raise RuntimeError('Source object must be geometry.')
sourceSkin = getSkinCluster(source)
if not sourceSkin:
raise RuntimeError("Source mesh doesn't have a skinCluster to copy from.")
destMesh = mc.ls(destinationVerts[0], o=True)[0]
destMesh = mc.listRelatives(destMesh, parent=True)[0]
destSkin = copySkinInfluences(source, destMesh)
tempSet = mc.sets(destinationVerts)
mc.select(source, tempSet)
mc.copySkinWeights(noMirror=True,
surfaceAssociation='closestPoint',
influenceAssociation='closestJoint',
normalize=True)
mc.delete(tempSet)
mc.select(destinationVerts)
评论列表
文章目录