orientjoints.py 文件源码

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

项目:cmt 作者: chadmv 项目源码 文件源码
def make_planar(joints):
    for joint in joints:
        parent = cmds.listRelatives(joint, parent=True, path=True)
        if not parent:
            log.warning('Cannot make %s planar because it does not have a parent.', joint)
            continue
        children = _unparent_children(joint)
        if not children:
            log.warning('Cannot make %s planar because it does not have any children.', joint)
            continue
        cmds.delete(cmds.aimConstraint(children[0], joint, aim=(1, 0, 0), u=(0, 1, 0), worldUpType='object', worldUpObject=parent[0]))
        cmds.makeIdentity(joint, apply=True)
        _reparent_children(joint, children)

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


问题


面经


文章

微信
公众号

扫码关注公众号