diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-10-04 23:00:02 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-10-05 19:00:32 -0300 |
commit | f12cb82e0f7b3348ab678322cf5e729b38861f1e (patch) | |
tree | ab9ccc69df906b8591e3f0b91c25266393304144 /editor | |
parent | a41cf404a9013db6aed56d6ed9b051c2a4948bff (diff) |
Fixes to baker, restored xatlas and fixed bake options.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_file_system.cpp | 12 | ||||
-rw-r--r-- | editor/editor_file_system.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index ee20d95f25..d73bf86f64 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1705,6 +1705,17 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) { emit_signal("resources_reimported", p_files); } +Error EditorFileSystem::_resource_import(const String &p_path) { + + Vector<String> files; + files.push_back(p_path); + + singleton->update_file(p_path); + singleton->reimport_files(files); + + return OK; +} + void EditorFileSystem::_bind_methods() { ClassDB::bind_method(D_METHOD("get_filesystem"), &EditorFileSystem::get_filesystem); @@ -1744,6 +1755,7 @@ void EditorFileSystem::_update_extensions() { EditorFileSystem::EditorFileSystem() { + ResourceLoader::import = _resource_import; reimport_on_missing_imported_files = GLOBAL_DEF("editor/reimport_missing_imported_files", true); singleton = this; diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h index f2f72eddbd..47077425a1 100644 --- a/editor/editor_file_system.h +++ b/editor/editor_file_system.h @@ -230,6 +230,8 @@ class EditorFileSystem : public Node { String _get_global_script_class(const String &p_type, const String &p_path, String *r_extends, String *r_icon_path) const; + static Error _resource_import(const String &p_path); + protected: void _notification(int p_what); static void _bind_methods(); |