newbee Posted October 6, 2019 Share Posted October 6, 2019 (edited) how to set tab sub menu path while creating hda using python I was able to get it working till here hda=hou.node('/obj/geo1/myhda') hdatype = hda.type().definition() xmlfile=hdatype.sections() print xmlfile now this prints out a bunch of lines but I dont see anything regards to tab sub menu path here is a link to a similar thread https://www.sidefx.com/forum/topic/40864/?page=1#post-183160 Edited October 6, 2019 by newbee Quote Link to comment Share on other sites More sharing options...
LucaScheller Posted October 7, 2019 Share Posted October 7, 2019 Hi! The tab menu is part of the default tool, so you have to look at the tool section. You can access it via: hda=hou.node('/obj/geo1/myhda') hdatype = hda.type().definition() tools=hdatype.sections()["Tools.shelf"] Then you have to update the <toolSubmenu> Insert Path Here </toolSubmenu> Part in the contents via: # Change Content content = tools.contents() print(content) content = content.replace("<toolSubmenu>Digital Assets</toolSubmenu>","<toolSubmenu>Insert Path Here</toolSubmenu>") tools.setContents(content) Here is how the xml is structured: https://github.com/LucaScheller/VFX-LYNX/blob/master/plugins/SideFX/Houdini/otls/LYNX_fabric.hda/LYNX_8_8Sop_1LYNX__fabric__pattern_8_81.1/Tools.shelf Cheers, Luca 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.