...
The File Browser is a dialog box designed for easy file/file name selection. By default, the File Browser does not filter on file types, however, filters can be provided using the -filters
flag. The filters string is contains a sequence of filter descriptions, followed by the actual filter (eg, .c3d). Descriptions and extensions are separated using the | character, as are subsequent descriptions and extensions. For example, to filter on .c3d and .csm files, a filters string will look like this:
Code Block | ||
---|---|---|
| ||
"Binary Motion File (.c3d)|.c3d|Character Studio (.csm)|.csm" |
An All Files (.*)
will automatically be appended to any filter string specified.
...
Scroll tablelayout | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
string array
Scroll pagebreak |
---|
Examples
Code Block | ||
---|---|---|
| ||
// Prompt the user to select file. |
...
string $files[]; |
...
string $initialPath = "C:/"; |
...
string $filter = "Binary Motion File (*.c3d)|*.c3d|Character Studio (*.csm)|*.csm"; |
...
...
// Specify the initial directory, the filters, and that the file they |
...
// select must exist. |
...
$files = `fileChooser -dir $initialPath -filters $filter -mustExist`; |
...
print $files; |
Additional information
Related commands
...