Edit Parameter Interface: file pattern for directories

   5683   3   2
User Avatar
Member
41 posts
Joined: 5月 2010
Offline
Hi
I would like to know when creating interface for a digital asset, how I can define a file pattern in File parameters for “folders” or “directories”; So that when the user is going to choose a file, when inside a folder and clicks Accept, it DOES accept the folder and doesn't need to click on a file.
User Avatar
Member
1391 posts
Joined: 12月 2010
Offline
But if you create a File parameter and Select only one Folder (Don't move inside folder) and Press Accept ,You will take just Folder path :?

However If you wanna select a File ,But Houdini put only Folder path in the parameter ,I think you should use Python Script :idea:

Write a simple python script to for extracting folder(directory) path from full file path ,then use this script in the “Callback Script” in the “Type Properties” window

*** Create hdaModule and call it in the “Callback Script” from File Parameter ***

Check Attached FIle :wink:

Attachments:
JKFolder_Select.zip (10.1 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
34 posts
Joined: 7月 2015
Offline
Hi Varomix,

I know it's been years, but I just needed that.
The filter I used:

*^.

What is will do is omit everything that have a dot in the name, so not the most elegant solution but works for me.
User Avatar
Member
8554 posts
Joined: 7月 2007
Offline
Houdini 16.5.202 Added a “File - Directory” parameter type, which specifies a path to a directory and opens the file chooser in directory selection mode. In the HDK, this can be done with PRM_DIRECTORY.
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links