Wouldnt this do it? -
LrDialogs.runOpenPanel( args ) Invokes the platform Open File dialog.
First supported in version 1.3 of the Lightroom SDK.
- 1. args
- (table) A table with these fields:
- title: (string) The title of the dialog.
- prompt: (string) The label of the default button. Replaces "Open".
- canChooseFiles: (Boolean) True to allow files to be selected.
- canChooseDirectories: (Boolean) True to allow directories to be selected.
- canCreateDirectories: (Boolean) True to include a button to create directories.
- allowsMultipleSelection: (Boolean) True to allow multiple files to be selected.
- fileTypes: (string or table) The file types that can be selected.
- accessoryView: (
LrView) A custom view to be included in the dialog.
- initialDirectory: (string, optional) Path to directory that should be initially opened.
Set canChooseFiles to false, and canChooseDirectories to true...(?)
Ah, you are correct. I was not expecting one parameter to completely change which standard dialog was used. I'm used to platform-independent SDK APIs having a 1:1 correspondence with the platform-specific APIs that they wrap. Changing canChooseFiles from false to true or vice versa completely changes it.
Thanks for pointing out the function Rob.
Its also worth noting that the last parameter (initialDirectory) works in Lightroom 2 even though it was first officially documented in Lightroom 3. Just mentioning it in case people are interested in writing backwards compatible plugins.