How can I build a file browser dialog, to select a file that doesn't yet exist? Or to select a directory only?
- fileBrowserDialog
- Notes: The docs on this suck, so this is what you need to do:
- Example:
- First, built the file brower dialog: -mode is telling it what to do:
- Next, you need to build a proc, that can take the return from the FBD, and then do something with it. It needs to be in the below format, but the proc name, and var names can change.
- So, the fileBrowserDialog passes its info, via the $result argument, into the "procName" proc. Then procName will update controlName with $result.
- Another issue: By default you can't specify WHERE the dialog will open too. It appears that it bases where it opens on where Maya's current workspace is. SO, to tell it where to go, you'd need to do something like this:
I find this article to be extremely useful, so I'll get it pasted. The original article is in
here