When I try to use fileDialog2 looking only for a directory but type something into the textfield as seen in the screenshot, the export button gets greyed out. I am distributing my scripts to some people that think that they have to copy the directory into the texfield but I would like to design my scripts as easy to use as possible, so that I do not have to ship a how-to-use textfile with it. Since fileDialog2 is used to get, in this case, a path, the textfield is not needed. Any chance to get around this?
`import maya.cmds as cmds
path = cmds.fileDialog2(dialogStyle = 2, fileMode = 3, okCaption = "Export", fileFilter = 'No files - leave the textfield above empty')