Possible to interact with main menu via script?

   401   0   1
User Avatar
Member
29 posts
Joined: 11月 2019
Offline
Hello,
I am wondering if it's possible to interact with the main menu via script? Such as returning a list of the current menu items at runtime. I say at runtime in case there are custom menu items which are not default, such as the RenderMan menu that shows up when it's installed, etc. Then if it is also possible to open specific menu items, or trigger their functionality via script? I have been searching all day in the help docs and github for examples but the closest things I can find have to do with what looks like simply creating new menu items with MenuParmTemplate().

I have found that there are menu items within MainMenuCommon.xml, but as an example, is there some way to get this info via something like menuList = hou.ui.getMenuNames() and then use hou.ui.openMenu(“h.Asset_Manager”)?

I also was trying to see if there was a way to a list of all current hotkeys. I see there are ways to get specific ones if you have the context code or vice versa, but I was trying to see if there was a way to just get all of them that there are currently?

Thanks,
-instanceid
Edited by instanceid - 2020年1月25日 23:24:37
  • Quick Links