Jump to content

Sub menus in a single shelf icon


salik

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.. 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...