| 768 | } |
| 769 | |
| 770 | void ImportExporter::write_scene_groups_cache(const String &p_output_dir, const Vector<std::shared_ptr<FileInfo>> &file_infos) { |
| 771 | if (get_settings()->get_ver_major() < 4) { |
| 772 | return; |
| 773 | } |
| 774 | constexpr const char *scene_groups_cache_path = ".godot/scene_groups_cache.cfg"; |
| 775 | String output_path = p_output_dir.path_join(scene_groups_cache_path); |
| 776 | Ref<ConfigFile> scene_groups_cache = memnew(ConfigFile); |
| 777 | if (FileAccess::exists(output_path)) { |
| 778 | Error err = scene_groups_cache->load(output_path); |
| 779 | if (err != OK) { |
| 780 | WARN_PRINT("Failed to load scene groups cache: " + output_path); |
| 781 | } |
| 782 | } |
| 783 | for (auto &file_info : file_infos) { |
| 784 | if (file_info->import_scene_groups.size() > 0) { |
| 785 | scene_groups_cache->set_value(file_info->file, "groups", gdre::hashset_to_array(file_info->import_scene_groups)); |
| 786 | } |
| 787 | } |
| 788 | gdre::ensure_dir(output_path.get_base_dir()); |
| 789 | Error err = scene_groups_cache->save(output_path); |
| 790 | if (err != OK) { |
| 791 | WARN_PRINT("Failed to save scene groups cache: " + output_path); |
| 792 | } |
| 793 | } |
| 794 | |
| 795 | // TODO: rethink this, it's not really recovering any keys beyond the first time |
| 796 | Error ImportExporter::_reexport_translations(Vector<ImportExporter::ExportToken> &non_multithreaded_tokens, size_t token_size, Ref<EditorProgressGDDC> pr) { |
nothing calls this directly
no test coverage detected