skin.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:mayakit 作者: danbradham 项目源码 文件源码
def copy_skin(source, destination):
    '''Duplicate the selected mesh with skinning'''

    joints = utils.get_history(source, 'joint')
    history = utils.get_history(destination, 'skinCluster')
    if history:
        skincluster = history[0]
        for joint in joints:
            try:
                cmds.skinCluster(skincluster, edit=True, lw=True, ai=joint)
            except RuntimeError as e:
                if 'is already attached' not in str(e):
                    raise
    else:
        skincluster = cmds.skinCluster(*(joints + [destination]), tsb=True)
    cmds.copySkinWeights(
        source, destination,
        noMirror=True,
        surfaceAssociation='closestPoint',
        influenceAssociation='closestJoint'
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号