【问题标题】:How can I manually interact with a custom Graph Editor in Maya (Using Python)如何在 Maya 中手动与自定义图形编辑器交互(使用 Python)
【发布时间】:2017-09-30 15:23:32
【问题描述】:

我一直在练习我的 python/mel 编码,并且对创建图形编辑器很感兴趣。我在网上做了很多研究,发现这个问题(How can I keep an object selected in the outliner after physically deselecting it in the 3d view?)对我有很大帮助。但是,我遇到了一个问题,我无法手动编辑生成的曲线。我不确定为什么会发生这种情况,并且似乎找不到任何明确的文档。 (我在 Maya 中查找了 mel/python 的命令参考,但似乎没有详细的解释)。

说得更清楚一点,我的目标是使用鼠标根据关键帧数据移动曲线信息(完全像 Maya 自己的图形编辑器)。我正在使用上一个示例中的代码解决方案(经过编辑以包含我自己的选择连接和框架约定)。

【问题讨论】:

    标签: python graph editor maya


    【解决方案1】:

    所以经过一些研究,我决定最简单的方法是在我的界面中使用 Maya 自己的图形编辑器

    # GRAPH ROW
    # Section for the graph editor to allow the user to change attributes
    paneLayout( configuration='single', parent=form, width=620, height=320 )
    # queries Maya's graph editor and places it within my frame
    graph = cmds.getPanel(scriptType='graphEditor')
    cmds.scriptedPanel( graph[0], e=True, unParent=True)
    cmds.scriptedPanel( graph[0], e=True, parent=frame1)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多