diff options
Diffstat (limited to 'editor/editor_file_system.h')
-rw-r--r-- | editor/editor_file_system.h | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index 6f4f058503..37eee13c16 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -31,12 +31,14 @@ #ifndef EDITOR_FILE_SYSTEM_H #define EDITOR_FILE_SYSTEM_H -#include "core/os/dir_access.h" +#include "core/io/dir_access.h" #include "core/os/thread.h" #include "core/os/thread_safe.h" #include "core/templates/safe_refcount.h" #include "core/templates/set.h" +#include "core/templates/thread_work_pool.h" #include "scene/main/node.h" + class FileAccess; struct EditorProgressBG; @@ -100,6 +102,8 @@ public: int find_file_index(const String &p_file) const; int find_dir_index(const String &p_dir) const; + void force_update(); + EditorFileSystemDirectory(); ~EditorFileSystemDirectory(); }; @@ -144,7 +148,6 @@ class EditorFileSystem : public Node { void _scan_filesystem(); - Set<String> late_added_files; //keep track of files that were added, these will be re-scanned Set<String> late_update_files; void _save_late_updated_files(); @@ -214,9 +217,11 @@ class EditorFileSystem : public Node { struct ImportFile { String path; + String importer; + bool threaded = false; int order = 0; bool operator<(const ImportFile &p_if) const { - return order < p_if.order; + return order == p_if.order ? (importer < p_if.importer) : (order < p_if.order); } }; @@ -236,6 +241,16 @@ class EditorFileSystem : public Node { Set<String> group_file_cache; + ThreadWorkPool import_threads; + + struct ImportThreadData { + const ImportFile *reimport_files; + int reimport_from; + int max_index = 0; + }; + + void _reimport_thread(uint32_t p_index, ImportThreadData *p_import_data); + protected: void _notification(int p_what); static void _bind_methods(); |