ninjismo Posted May 17, 2020 Share Posted May 17, 2020 Hi! I'm writing a shelf tool that allows users on Linux to search a directory and its sub-directories for a certain file-type / keyword. To do this I've used a readMultiInput like below - start_popup = hou.ui.readMultiInput(start_message, ("Path to Search", "File to Look For"), initial_contents=(home_dir, ".exr"), title="File Finder", buttons=('OK', 'Cancel'), default_choice=0, close_choice=1) In this version of the script, users need to manually type in / paste the directory they want to search, but I'd like for there to be a pop-up dialog allowing users to select a folder, the same way hou.ui.selectFile() allows you to select a file. Is there a way to do this? Quote Link to comment Share on other sites More sharing options...
anim Posted May 17, 2020 Share Posted May 17, 2020 4 hours ago, ninjismo said: I'd like for there to be a pop-up dialog allowing users to select a folder, the same way hou.ui.selectFile() allows you to select a file. hou.ui.selectFile(file_type=hou.fileType.Directory) Quote Link to comment Share on other sites More sharing options...
ninjismo Posted May 17, 2020 Author Share Posted May 17, 2020 Thanks, Tomas! This is exactly what I was looking for. 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.