Add icons for more file types in the editor asset installer
(cherry picked from commit 9698486605
)
This commit is contained in:
parent
32e91b232c
commit
8c08b52871
1 changed files with 48 additions and 8 deletions
|
@ -132,14 +132,54 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
|||
|
||||
Map<String, Ref<Texture>> extension_guess;
|
||||
{
|
||||
extension_guess["png"] = get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["jpg"] = get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["atlastex"] = get_icon("AtlasTexture", "EditorIcons");
|
||||
extension_guess["scn"] = get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["tscn"] = get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["shader"] = get_icon("Shader", "EditorIcons");
|
||||
extension_guess["gd"] = get_icon("GDScript", "EditorIcons");
|
||||
extension_guess["vs"] = get_icon("VisualScript", "EditorIcons");
|
||||
extension_guess["bmp"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["dds"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["exr"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["hdr"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["jpg"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["jpeg"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["png"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["svg"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["svgz"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["tga"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
extension_guess["webp"] = tree->get_icon("ImageTexture", "EditorIcons");
|
||||
|
||||
extension_guess["wav"] = tree->get_icon("AudioStreamSample", "EditorIcons");
|
||||
extension_guess["ogg"] = tree->get_icon("AudioStreamOGGVorbis", "EditorIcons");
|
||||
extension_guess["mp3"] = tree->get_icon("AudioStreamMP3", "EditorIcons");
|
||||
|
||||
extension_guess["scn"] = tree->get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["tscn"] = tree->get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["escn"] = tree->get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["dae"] = tree->get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["gltf"] = tree->get_icon("PackedScene", "EditorIcons");
|
||||
extension_guess["glb"] = tree->get_icon("PackedScene", "EditorIcons");
|
||||
|
||||
extension_guess["gdshader"] = tree->get_icon("Shader", "EditorIcons");
|
||||
extension_guess["gd"] = tree->get_icon("GDScript", "EditorIcons");
|
||||
if (Engine::get_singleton()->has_singleton("GodotSharp")) {
|
||||
extension_guess["cs"] = tree->get_icon("CSharpScript", "EditorIcons");
|
||||
} else {
|
||||
// Mark C# support as unavailable.
|
||||
extension_guess["cs"] = tree->get_icon("ImportFail", "EditorIcons");
|
||||
}
|
||||
extension_guess["vs"] = tree->get_icon("VisualScript", "EditorIcons");
|
||||
|
||||
extension_guess["res"] = tree->get_icon("Resource", "EditorIcons");
|
||||
extension_guess["tres"] = tree->get_icon("Resource", "EditorIcons");
|
||||
extension_guess["atlastex"] = tree->get_icon("AtlasTexture", "EditorIcons");
|
||||
// By default, OBJ files are imported as Mesh resources rather than PackedScenes.
|
||||
extension_guess["obj"] = tree->get_icon("Mesh", "EditorIcons");
|
||||
|
||||
extension_guess["txt"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["md"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["rst"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["json"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["yml"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["yaml"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["toml"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["cfg"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
extension_guess["ini"] = tree->get_icon("TextFile", "EditorIcons");
|
||||
}
|
||||
|
||||
Ref<Texture> generic_extension = get_icon("Object", "EditorIcons");
|
||||
|
|
Loading…
Reference in a new issue