Houdini tip | Open parameter path in file browser

Hello,
in this post I will show you a small convenience trick. It will help you with locating files in your OS file browser, opening images in Mplay or any other application like Djv_view, RV.., directly from Houdini parameter window.

reveal.png

UPDATE 1: Fixed RV script to open folder with whole sequence instead of just one frame
UPDATE 2: Added Photoshop menu item, updated RV, mentioned Sequence From File package
UPDATE 3: On Linux, when opening in File browser, I clear LD_LIBRARY_PATH environment variable which may cause bugs in some situations, fixed some mistakes.
UPDATE 4: Fixed a bug, where Mplay opening script would incorrectly expand $OS variable in file path.

In Houdini you can modify couple of UI menus. Luckily one of the menus which you can modify is the one you see after right-clicking on a node parameter.
Those menu modifications are quite handy and well-controllable.

To modify parameter menu, you can create PARMmenu.xml file and put it into your $HOUDINI_PATH. PARMmenu.xml already exists in your $HH folder (houdini_installation_folder/houdini) and has defined all the default items. What you can do is to either edit this file, or create a new complementary one.

To add Open in… menu items as seen in the screenshot, create an empty PARMmenu.xml file and put it into houdini folder in your home directory (Linux: ~/houdini16.5, Windows: C:\Users\Username\Documents\houdini16.5). You can also put it to another directory which is in your $HOUDINI_PATH variable, or you can specify $HOUDINI_MENU_PATH variable pointing to the folder containing your file.

Put the following file into PARMmenu.xml: 

After that you can start a new Houdini session and after right-clicking on any string parameter you should see the menu 🙂

Feel free to add your favorite tools into the menu. Note that you need to have tools executables present in your system $PATH variable.

One note for RV: right now the menu item will open the current frame only, if you want to load the whole sequence, then enable  Sequence From File package in your RV settings.

The menu items can contain a script to be executed or can refer to external python file.
One of nice features is that you can set a context expression for your menu items controlling whether they are visible. This way I limited them for string parameters only.

You can find more information about modifying menus in the documentation and you can check $HH/PARMmenu.xml for good example of using it.

One note: I was experiencing Houdini crashes on Windows after setting a context expression directly on scriptItem. Setting it on subMenu worked fine (the bug should be fixed in Houdini 16.5.484).

Thanks for reading all the way down 🙂

Houdini tip | Open parameter path in file browser