简体   繁体   English

使用 python api 的 Maya 自定义 HUD

[英]Maya Custom HUD with python api

i wanted to create a custom heads up display like the maya resolution gate for my tool that i could control it with my window.我想为我的工具创建一个像 Maya 分辨率门这样的自定义平视显示器,我可以用我的窗口来控制它。

i try using MPxDrawOverride and create what i want, but ...我尝试使用 MPxDrawOverride 并创建我想要的东西,但是......

  1. i see MHUDRender class in the python api documentation, but can't find how use this class.我在 python api 文档中看到了 MHUDRender 类,但找不到如何使用这个类。 try several ways without a result.any suggestion尝试几种方法都没有结果。任何建议

  2. for the hud that i created, i use MPxLocatorNode , so for this hud to work i should create the node and because of that i have a transform node in the outliner.对于我创建的 hud,我使用 MPxLocatorNode ,所以为了让这个 hud 工作,我应该创建节点,因此我在大纲中有一个变换节点。

is there a way that i can create my custom HUD without create the node?有没有一种方法可以在不创建节点的情况下创建我的自定义 HUD? should i use MHUDRender?我应该使用 MHUDRender 吗? i create several MPxCommand, so that i can control the hud with my ui.我创建了几个 MPxCommand,以便我可以用我的 ui 控制 hud。 is this the right way?这是正确的方法吗?

Custom HUD with MPxDrawOverride使用 MPxDrawOverride 自定义 HUD

transform node of the hud in the outliner大纲中 hud 的变换节点

如果您正在寻找一种无需插件即可操作 HUD 的方法,请查看headUpDisplay()命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM