paint: show plugin formats

This commit is contained in:
luboslenco
2026-02-12 17:15:53 +01:00
parent 4a87d04a80
commit 461aea7542
2 changed files with 12 additions and 1 deletions
+6 -1
View File
@@ -123,9 +123,14 @@ function path_is_gimp_color_palette(path: string): bool {
return ends_with(p, ".gpl");
}
function path_is_ext_format(path: string): bool {
let p: string = to_lower_case(path);
return ends_with(p, ".fbx") || ends_with(p, ".gltf") || ends_with(p, ".glb") || ends_with(p, ".stl") || ends_with(p, ".svg");
}
function path_is_known(path: string): bool {
return path_is_mesh(path) || path_is_texture(path) || path_is_font(path) || path_is_project(path) || path_is_plugin(path) || path_is_text(path) ||
path_is_gimp_color_palette(path);
path_is_gimp_color_palette(path) || path_is_ext_format(path);
}
function path_check_ext(p: string, exts: string[]): bool {
+6
View File
@@ -371,6 +371,12 @@ function project_import_mesh(replace_existing: bool = true, done: () => void = n
// Show .fbx in the file picker even when fbx plugin is not yet enabled
formats += ",fbx";
}
if (string_index_of(formats, "gltf") == -1) {
formats += ",gltf";
}
if (string_index_of(formats, "glb") == -1) {
formats += ",glb";
}
ui_files_show(formats, false, false, function(path: string) {
project_import_mesh_box(path, _project_import_mesh_replace_existing, true, _project_import_mesh_done);
});