orientjoints.py 文件源码

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

项目:cmt 作者: chadmv 项目源码 文件源码
def align_with_child(joints):
    """Aligns the up axis of the given joints with their respective child joint.

    @param joints: List of joints to orient.
    """
    for joint in joints:
        children = _unparent_children(joint)
        if children:
            cmds.delete(cmds.aimConstraint(children[0], joint, aim=(1, 0, 0), upVector=(0, 1, 0),
                                           worldUpType="objectrotation", worldUpVector=(0, 1, 0),
                                           worldUpObject=children[0]))
            cmds.makeIdentity(joint, apply=True)
        _reparent_children(joint, children)

    if joints:
        cmds.select(joints)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号