【问题标题】:move the key between frames - Maya Graph Editor在帧之间移动关键点 - Maya 图形编辑器
【发布时间】:2021-10-14 23:59:51
【问题描述】:

我在图表编辑器中有很多关键点,在缩放它们之后,Maya 在帧之间移动了其中的一些(帧 5,37-4'54-...)。我知道如何一一移动它们,但我想创建任何脚本将它们放在 o 之前的一帧之后。

选择所有键 - 单击右键 - 捕捉选项不够

【问题讨论】:

    标签: python graph key frame maya


    【解决方案1】:

    查看selectKeykeyframe 命令。

    你可以这样做:

    from maya import cmds
    
    # Select the keys to be moved based on a time interval.
    # For example the following commands will select keys between 5.01 and 5.99.
    # Customize the interval and object/attributes based on your need.
    cmds.selectKey(clear=True)
    cmds.selectKey('pSphere1.tx', add=True, keyframe=True, time=(5.01, 5.99))
    cmds.selectKey('pSphere1.ty', add=True, keyframe=True, time=(5.01, 5.99))
    cmds.selectKey('pSphere1.tz', add=True, keyframe=True, time=(5.01, 5.99))
    
    # Change the time of the selected keys to the correct value (for example 5.0)
    cmds.keyframe(animation='keys', option='over', absolute=True, timeChange=5.0)
    

    【讨论】:

      猜你喜欢
      • 2019-11-27
      • 1970-01-01
      • 1970-01-01
      • 2014-05-06
      • 1970-01-01
      • 2012-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多