Methods | |
String | doAudioClipOpenDialog (String startWith="", DzWidget parent=undefined) |
String | doDirectoryDialog (String title, String desc, String startWith, DzWidget parent=undefined) |
String | doDirectoryDialog (String title="", String desc="", DzWidget parent=undefined) |
String | doFileDialog (Boolean open, String title="", String startWith="", String filter="", Number selectedFilter=0, DzWidget parent=undefined) |
String | doImageDialog (Boolean open, String startWith="", DzWidget parent=undefined) |
String | doVideoClipSaveDialog (String startWith="", DzWidget parent=undefined) |
Array | getOpenFileNames (String dir="", String filter="", String title="", DzWidget parent=undefined) |
The DzFileDialog class is available in DAZ Script via the global variable FileDialog. It provides functions that display OS native file dialogs to the user.
Convenience file dialog: Automatically creates a filter list for all audio formats we can import and displays a file open dialog
startWith | Starting directory (can include a default file name) | |
parent | The parent widget for the file dialog |
String DzFileDialog::doDirectoryDialog | ( | String | title, | |
String | desc, | |||
String | startWith, | |||
DzWidget | parent = undefined | |||
) |
Display a dialog for the user to choose a directory
title | Title of the dialog box | |
desc | If non-null, puts up a description field and returns new desc | |
startWith | The directory that the dialog will start in | |
parent | The parent widget for the directory dialog |
var path = FileDialog.doDirectoryDialog( "Select a Directory", "", App.getDocumentsPath() );
String DzFileDialog::doDirectoryDialog | ( | String | title = "" , |
|
String | desc = "" , |
|||
DzWidget | parent = undefined | |||
) |
Display a dialog for the user to choose a directory
title | Title of the dialog box | |
desc | If non-null, puts up a description field and returns new desc | |
parent | The parent widget for the directory dialog |
var path = FileDialog.doDirectoryDialog( "Select a Directory" );
String DzFileDialog::doFileDialog | ( | Boolean | open, | |
String | title = "" , |
|||
String | startWith = "" , |
|||
String | filter = "" , |
|||
Number | selectedFilter = 0 , |
|||
DzWidget | parent = undefined | |||
) |
Display a dialog for the user to choose a file
open | If true displays an open file dialog, otherwise displays a save file dialog. | |
title | Title of the dialog box | |
startWith | Starting directory (can include a default file name) | |
filter | The file name filter - e.g. "TIFF files (*.tif *.tiff); JPEG files (*.jpg)"; | |
selectedFilter | If not NULL, its value is set to the index of the filter that coresponds to the selected file. | |
parent | The parent widget for the file dialog |
var filename = FileDialog.doFileDialog( true, "Select an Image File", App.getImageMgr().getImportPath(), "JPEG Files (*.jpg)" );
var filename = FileDialog.doFileDialog( true, "Select an Image File", "", "Image Files (*.tif *.tiff *.jpg);TIFF Files (*.tif *.tiff);JPEG Files (*.jpg)" );
var filename = FileDialog.doFileDialog( false, "Save As", "", "Text Files (*.txt)" );
String DzFileDialog::doImageDialog | ( | Boolean | open, | |
String | startWith = "" , |
|||
DzWidget | parent = undefined | |||
) |
Convenience file dialog: Automatically creates a filter list for all image formats we can import/export and displays a file open/save dialog
open | If true displays an open image dialog, otherwise displays a save image dialog. | |
startWith | Starting directory (can include a default file name) | |
parent | The parent widget for the file dialog |
Convenience file dialog: Automatically creates a filter list for all video formats we can export and displays a file save dialog
startWith | Starting directory (can include a default file name) | |
parent | The parent widget for the file dialog |
Array DzFileDialog::getOpenFileNames | ( | String | dir = "" , |
|
String | filter = "" , |
|||
String | title = "" , |
|||
DzWidget | parent = undefined | |||
) |
Shows an open file dialog to the user that allows selection of multiple files.
dir | The directory that the dialog will start with. | |
filter | The file name filter - e.g. "TIFF files (*.tif *.tiff); JPEG files (*.jpg)"; | |
title | The title of the dialog | |
parent | The parent widget of the dialog |
var files = FileDialog.getOpenFileNames( "", "Image files (*.tif *.jpg *.png)", "Select Image Files" );