Script_Maya.py 文件源码

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

项目:3D_Software_and_Python 作者: p4vv37 项目源码 文件源码
def set_position_keys(target, keyframes):
    """
    Function animates the position of given object by creating the given keyframes.

    :param obj:  String - Name of an object which scale will be animated
    :param keyframes: Python list - Keyframes that will be created: [[int time, [float x, float y, float z]], ...]
    """

    for keyframe in keyframes:  # For every keyframe from the list of keyframes scale object at proper time
        cmds.setKeyframe(target, attribute='translateX', v=keyframe[0][0], time=keyframe[1], itt="fast", ott="fast")
        cmds.setKeyframe(target, attribute='translateY', v=keyframe[0][1], time=keyframe[1], itt="fast", ott="fast")
        cmds.setKeyframe(target, attribute='translateZ', v=keyframe[0][2], time=keyframe[1], itt="fast", ott="fast")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号