salik Posted December 1, 2016 Share Posted December 1, 2016 Is it possible to create a shelf icon with sub menu functionality (like in Maya?) I have 2 similar scripts which works about in the same way but it uses different node types and instead of creating individual shelf icon for these 2 scripts, I am thinking of combining them together (or something) and presents together as 1 single shelf icon with sub menu options. Basically, if you click on this icon, you will be presented with 2 options for example.. If you click on option 1, it will run function/scriptA, if the other option is selection, function/scriptB will be executed instead.. Can this be done? Quote Link to comment Share on other sites More sharing options...
Mandrake0 Posted December 1, 2016 Share Posted December 1, 2016 look into the python UI Functions. http://www.sidefx.com/docs/houdini/hom/hou/ui selectFromList(choices, default_choices=(0,), exclusive=False, message=None, title=None,column_header=None, num_visible_rows=10) #Houdini Python Tab: value = hou.ui.selectFromList(["one", "two"]) #the value will have the return position 0 or 1. Quote Link to comment Share on other sites More sharing options...
salik Posted December 1, 2016 Author Share Posted December 1, 2016 38 minutes ago, Mandrake0 said: look into the python UI Functions. http://www.sidefx.com/docs/houdini/hom/hou/ui selectFromList(choices, default_choices=(0,), exclusive=False, message=None, title=None,column_header=None, num_visible_rows=10) #Houdini Python Tab: value = hou.ui.selectFromList(["one", "two"]) #the value will have the return position 0 or 1. But this is giving me an ui in which it is probably something that I would not want.. Quote Link to comment Share on other sites More sharing options...
goldleaf Posted December 2, 2016 Share Posted December 2, 2016 Not with shelves, but you can add to the Main Menu in Houdini. By adding your own MainMenuCommon.xml file in your houdini prefs dir, you can add menus of custom commands. Here are some links: https://www.sidefx.com/docs/houdini/basics/config_menus https://houdinitricks.com/custom-main-menus-in-houdini/ Hope that helps! Quote Link to comment Share on other sites More sharing options...
Mandrake0 Posted December 5, 2016 Share Posted December 5, 2016 what you also could do is to add a keyboard checking when you click (LMB) on the icon it uses function 1 when you CTRL-Click (LMB) it uses function 2. you could use ctrl, alt, shift, or maybe any type of character. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.