1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Added ability for multiple images to be imported as an atlas

This adds support for groups in the import system, which point to a single file.
Add property hint for saving files in file field
This commit is contained in:
Juan Linietsky
2019-04-19 15:54:33 -03:00
parent 8e652a1400
commit 04847ef5f9
35 changed files with 1818 additions and 33 deletions

View File

@@ -608,6 +608,30 @@ int ResourceLoader::get_import_order(const String &p_path) {
return 0;
}
String ResourceLoader::get_import_group_file(const String &p_path) {
String path = _path_remap(p_path);
String local_path;
if (path.is_rel_path())
local_path = "res://" + path;
else
local_path = ProjectSettings::get_singleton()->localize_path(path);
for (int i = 0; i < loader_count; i++) {
if (!loader[i]->recognize_path(local_path))
continue;
/*
if (p_type_hint!="" && !loader[i]->handles_type(p_type_hint))
continue;
*/
return loader[i]->get_import_group_file(p_path);
}
return String(); //not found
}
bool ResourceLoader::is_import_valid(const String &p_path) {
String path = _path_remap(p_path);