Magnus Pettersson Posted February 15, 2013 Share Posted February 15, 2013 Hello guys, Im having some trouble with adding custom code to PARMmenu.xml. I get it to show up in the menu and run fine, but i cant seem to get it into the right position in the list. I have tried all the <insertBefore> and <instertAfter> and <insertAtIndex> combinations but my item is dead stuck last on the rmb parm list. Here is my code in PARMmenu.xml in ~/houdini12.1 now: <menuDocument><menu><scriptItem id="togglePublishPath"><label>Toggle scratch/publish path</label><insertBefore /><scriptCode><![CDATA[import parmMenu; reload(parmMenu); parmMenu.togglePublishPath(kwargs)]]></scriptCode></scriptItem></menu></menuDocument>[/CODE]ps. Is there a way to only show this menu item on string/file parms? Quote Link to comment Share on other sites More sharing options...
graham Posted February 15, 2013 Share Posted February 15, 2013 You need to put your <insertBefore> tag inside of a <modifyItem> tag like so: <modifyItem><insertBefore>lock_parm</insertBefore></modifyItem> See $HH/MainMenuMaster for more info. There's currently no way to add any sort of filtering to the menu. The best you can do is to have the code that is called check against the parm being a string/file and if not, do nothing. Quote Link to comment Share on other sites More sharing options...
Magnus Pettersson Posted February 16, 2013 Author Share Posted February 16, 2013 Awesome Graham, I totally missed that <modifyItem> tag! 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.