pymel.core.system.fileDialog

fileDialog(*args, **kwargs)

Displays a file picking window, and returns the name of the file that the user picked. If the user picked no file, then an empty string is returned.

Flags:
Long name (short name) Argument Types Properties
application (app) bool ../../../_images/create.gif
 
This is a Maconly flag. This brings up the dialog which selects only the application bundle.
defaultFileName (dfn) unicode ../../../_images/create.gif
 
Set default file name. This flag is available under writemode
directoryMask (dm) unicode ../../../_images/create.gif
 

This can be used to specify what directory and file names will be displayed in the dialog. If not specified, the current directory will be used, with all files displayed. The string may contain a path name, and must contain a wild-carded file specifier. (eg *.ccor /usr/u/*) If just a path is specified, then the last directory in the path is taken to be a file specifier, and this will not produce the desired results.

mode (m) int ../../../_images/create.gif
 
Defines the mode in which to run the file dialog: 0 for read1 for writeWrite mode can not be used in conjunction with the -application flag.
title (t) unicode ../../../_images/create.gif
 

Set title text. The default value under writemode is Save As. The defaule value under readmode is Open. Flag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.fileDialog

Example:

import pymel.core as pm

pm.fileDialog()
pm.fileDialog( directoryMask='/usr/u/bozo/myFiles/*.ma' )
pm.fileDialog( dm='*.cc' )

Previous topic

pymel.core.system.fileBrowserDialog

Next topic

pymel.core.system.fileDialog2

Core

Core Modules

Other Modules

This Page