Setting paths for HDA file loads

   2851   2   0
User Avatar
Member
9 posts
Joined: Sept. 2018
Offline
I am using Houdini Engine inside Unity to assemble/manipulate various artist created assets. Using a file node in the HDA loads the .fbx assets just fine. But this is a big project with lots of sub-directories where assets are stored. To load various assets for manipulation we have to click through a lot of directories to get where we want.

How can I set an explicit path so that the artists who will work with the tool can have the load dialogue open in a default directory.

Example. Someone might load trees from Assets/environment/models/terrain/props/vegetation/ but buildings from Assets/environment/models/structures/urban/components/

I'm sure it's something simple, but I haven't been able to find the answer.
User Avatar
Member
571 posts
Joined: May 2017
Offline
There isn't a way to specify default directory manually for types of files. But since its calling the Unity API EditorUtility.OpenFilePanel, which takes in the current value of the directory or file path parm, then the best thing to do is give a default value for that parm to point to the subdirectory you'd want.
User Avatar
Member
9 posts
Joined: Sept. 2018
Offline
Thanks seelan. For my particular situation there was also another easy approach. Thanks to SideFx TD Mike for this.

Since the file was being selected with a file parameter in an HDA, this turned out to be as easy as:
1 Open HDA type properties
2 Open the Parameters tab
3 Select the file parameter in the existing parameters
4 Open the channels tab in the parameter description
5 Set the default value (left field) to the desired path

From then on the field for the file load will be auto-populated with this path.
  • Quick Links