1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +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

@@ -1257,6 +1257,10 @@ void FileSystemDock::_rename_operation_confirm() {
return;
}
if (EditorFileSystem::get_singleton()->is_group_file(old_path)) {
EditorFileSystem::get_singleton()->move_group_file(old_path, new_path);
}
//Present a more user friendly warning for name conflict
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
#if defined(WINDOWS_ENABLED) || defined(UWP_ENABLED)
@@ -1354,6 +1358,16 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool overw
}
}
//check groups
for (int i = 0; i < to_move.size(); i++) {
print_line("is group: " + to_move[i].path + ": " + itos(EditorFileSystem::get_singleton()->is_group_file(to_move[i].path)));
if (to_move[i].is_file && EditorFileSystem::get_singleton()->is_group_file(to_move[i].path)) {
print_line("move to: " + p_to_path.plus_file(to_move[i].path.get_file()));
EditorFileSystem::get_singleton()->move_group_file(to_move[i].path, p_to_path.plus_file(to_move[i].path.get_file()));
}
}
Map<String, String> file_renames;
Map<String, String> folder_renames;
bool is_moved = false;