如何将 MEL UI 连接到 Maya 的 UV 纹理编辑器?

发布于 2024-07-25 12:09:55 字数 133 浏览 2 评论 0原文

我确实知道如何创建 MEL UI 窗口并向其中添加内容。 我不知道如何将该 UI“固定”到 Maya 窗口,例如 UV 纹理编辑器。 理想情况下,我希望能够控制 UI 附加到 UV 纹理编辑器的哪一侧,并使其随窗口移动和最小化。 这样的事可能吗?

I do know how to create a MEL UI window and add content to it. I don't know how to "pin" that UI to a Maya window such as the UV Texture Editor. Ideally I would like to have the ability to control which side of the UV Texture Editor my UI attaches to and have it move and minimize with the window. Is such a thing possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

为你拒绝所有暧昧 2024-08-01 12:09:55

使用 MEL 窗口,您只需要知道窗口的名称,然后就可以将自己的 UI 插入其中(创建新 UI 时使用 -parent 选项)。 不过,除非您知道窗户是如何构造的,否则这可能很困难。

最好的起点是:

在脚本编辑器窗口的菜单中,您可以启用一个选项来显示 Maya 运行时执行的所有 MEL 命令。 启用此功能后,打开目标窗口(在本例中为纹理窗口),然后返回到脚本编辑器(再次关闭回显命令选项,否则您将收到垃圾邮件!)并查看 Maya 运行了哪些命令。 您将能够找到负责创建/显示纹理窗口的命令的名称。

然后,您可以在 Maya 安装的 mel 脚本中搜索该函数,并查看如何创建纹理窗口。 然后,您的选择是尝试将 UI 很好地添加到现有窗口,或者复制整个 Maya 脚本并修改它以创建全新的纹理窗口。

With a MEL window you just need to know the name of the window and you can insert your own UI into it (using the -parent option when your creating new UI). This can be difficult unless you know how the window was constructed, though.

The best place to start is:

In the menu for the script editor window, you can enable an option to display all the MEL commands that are executed as Maya runs. Once this is enabled, open the target window (in this case the texture window) then go back to the script editor (turn off the echo commands option again or you'll get spammed!) and see what commands Maya ran. You will be able to find the name of the command that is responsible for creating/showing the texture window.

Then you can search in the Maya installation's mel scripts for that function, and see how the texture window is created. Your options are then to try to nicely add your UI to the existing window, or copy the entire Maya script and modify it to create a completely new texture window.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文