0 votes

How to configure the file dialog for specific files? For example, when Paint opens a file, you can choose what to open. I couldn't do it. Tried via add_filter(".vox"). It didn't work out... Maybe we need to do it in a different way? Is this even configurable somewhere else?

Godot version 3.5.1
in Engine by (79 points)

1 Answer

0 votes
Best answer

Godot expects

$FileDialog.set_filters(["*vox ; Voxlap super blocky 3D format"])

Or

$FileDialog.add_filter("*.vox ; Voxlap super blocky 3D format")

For multiple

var allowed = ["*vox", "*png", "*bmp", "*dds"]
$FileDialog.set_filters(allowed)
by (6,876 points)
selected by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.