How to set filters for getFilenameDialig()

python

(Meng-Han Ho) #1

Hi,
Try to use getFilenameDiaglog() to make user picking one exr file. However, I could not figure out how to set filters properly.
The documents shows that

NatronGui.GuiApp.getFilenameDialog(filters[, location=None])
filters – sequence
filters is a list of file extensions that should be displayed in the file dialog.

I’ve tried following in script editors but all failed.
app1.getFilenameDialog([‘exr’])
app1.getFilenameDialog((‘exr’))

what’s sequence datatype? how to set filters? in list or tuple?


(Frédéric Devernay) #2

filters is a list of strings, but it doesn’t seem to work. will check


(Frédéric Devernay) #3

Filed an issue, but no time to fix it for now: https://github.com/NatronGitHub/Natron/issues/270