Jump to content

File Browser default Path


Mossman

Recommended Posts

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!

Link to comment
Share on other sites

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'

 

  • Like 1
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.  

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...

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/"

 

 

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