ml_convertRotationOrder.py 文件源码

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

项目:ml_tools 作者: morganloomis 项目源码 文件源码
def isWorldSpaceControl(obj):

    #first, if the object itself doesn't inherit transforms, it's a world space node.
    if not mc.getAttr(obj+'.inheritsTransform'):
        return True

    #walk up the hierarchy testing for any rotation value on x or z, or inherit transform
    parent = mc.listRelatives(obj, parent=True)
    while(parent):
        if not mc.getAttr(parent[0]+'.inheritsTransform'):
            return True
        for attr in ('.rx','.rz'):
            if mc.getAttr(parent[0]+attr) != 0:
                return False
        parent = mc.listRelatives(parent, parent=True)
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号