SEToolsPlugin.py 文件源码

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

项目:SETools 作者: dtzxporter 项目源码 文件源码
def ResetSceneAnim():
    # Loop through them all
    SceneJoints = cmds.ls(type="joint")
    # Loop
    for name in SceneJoints:
        # Disconnect if required
        ResetBoneKeyframes(DagPathFromJoint(name, False).transform())
        # Check for undo
        if (cmds.objExists(name + ".seanimUndoT")):
            # Reset to it
            ResetTranslation = cmds.getAttr(name + ".seanimUndoT")[0]
            ResetScale = cmds.getAttr(name + ".seanimUndoS")[0]
            ResetRotation = cmds.getAttr(name + ".seanimUndoR")[0]
            # Apply
            cmds.setAttr(name + ".t", ResetTranslation[0], ResetTranslation[1], ResetTranslation[2])
            cmds.setAttr(name + ".scale", ResetScale[0], ResetScale[1], ResetScale[2])
            cmds.setAttr(name + ".r", 0, 0, 0)
            cmds.setAttr(name + ".jo", ResetRotation[0], ResetRotation[1], ResetRotation[2])
    # Remove notetracks
    if cmds.objExists("SENotes"):
        # Delete
        cmds.delete("SENotes")

# Processes a joint, creating it's rest position, and returning a dag path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号