Mossman Posted October 28, 2016 Share Posted October 28, 2016 Hi there! First post of another ex-Softimage user migrating to Houdini land. Very exciting! I'm currently trying to integrate Houdini into our pipeline. And something I always wanted to do (but couldn't) inside Softimage is to dynamically change the default path of the file browser. So if the user wants to import images, geo, ... the file browser would directly jump to the right location, ideally based on env variables like $JOB. Is this possible with Houdini? I've been searching through the various config files but I couldn't find the one setting the default path. Currently it appears to bei either $HIP or the most recent location. Thanks! Quote Link to comment Share on other sites More sharing options...
michael Posted October 28, 2016 Share Posted October 28, 2016 inside your $HOME/houdini15.5/ there is a file called jump.pref (if there isn't you can make one) in this file you can list paths (with env vars) like this: $PROJECT/$ASSET/geo/ /mnt/someDir/someOtherDir now these paths will show up on the left hand side of the file browser as 'favorites' 1 Quote Link to comment Share on other sites More sharing options...
Mossman Posted October 28, 2016 Author Share Posted October 28, 2016 Cool, that's a good start, thanks! Maybe there is also a way to set the path directly? Also it would be nice to set different directories in case the user want's to import images, geo, etc. Quote Link to comment Share on other sites More sharing options...
michael Posted October 28, 2016 Share Posted October 28, 2016 not sure what you mean by 'set the path directly' when in Houdini you can browse to a folder and then set a 'favourite' which will add that path to the jump.pref 1 Quote Link to comment Share on other sites More sharing options...
Mossman Posted October 31, 2016 Author Share Posted October 31, 2016 What I mean is that the browser opens and the user is directly in the right directory without having to click on a favourite and depending on the type of file he wants to import. But if that's not possible your trick with jump.pref will suffice for now. Thanks again! Quote Link to comment Share on other sites More sharing options...
Sean Lewkiw Posted October 31, 2016 Share Posted October 31, 2016 Not sure if you've tried this, but if you put the "right" path in the file parm (with or without a file name) before you open the browser, the browser will open in that dir. So if your utility knows where it's supposed to look, you can programatically put the right path in the file parm first. 1 Quote Link to comment Share on other sites More sharing options...
garf Posted November 22, 2016 Share Posted November 22, 2016 You can using houdini scripted UIs (selectFile is what you want) https://www.sidefx.com/docs/houdini/hom/hou/ui From the docs: selectFile(start_directory=None, title=None, collapse_sequences=False, file_type=hou.fileType.None, pattern=None, default_value=None, multiple_select=False, image_chooser=False, chooser_mode=hou.fileChooserMode.ReadAndWrite) → str So for example: dialog = hou.ui.selectFile(start_directory=hou.hscriptExpression("$JOB"), title='Select your file', file_type=hou.fileType.Image) You can make start_directory a $VARIABLE or something more explicit like "/my_folder/images/" 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.