How to set filters for getFilenameDialig()

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?

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

Filed an issue, but no time to fix it for now: Python API: "filters" argument is ignored in app.getFilenameDialog(filters) · Issue #270 · NatronGitHub/Natron · GitHub

1 Like