diff options
author | Lyuma <xn.lyuma@gmail.com> | 2022-05-13 10:35:12 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2022-05-17 00:45:48 -0700 |
commit | 41824c6cc81c470a97d19269173aea8d53292da8 (patch) | |
tree | f4a669406a491171d5ab20bd5d6076a5776fb34b /editor | |
parent | 743fce68340c9f4e0aa171efb8e9c513e764cd00 (diff) |
Bind EditorFileSystem::reimport_files and improve docs
reimport_files offers a way for scripts to modify imported resources directly.
For example, images, sounds or glTF documents which are written by an external program.
It is much faster than `scan`, and can allow scripts to synchronously proceed after import finishes.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_file_system.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 36ac9afca8..56edb03184 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -2372,6 +2372,7 @@ void EditorFileSystem::_bind_methods() { ClassDB::bind_method(D_METHOD("get_filesystem_path", "path"), &EditorFileSystem::get_filesystem_path); ClassDB::bind_method(D_METHOD("get_file_type", "path"), &EditorFileSystem::get_file_type); ClassDB::bind_method(D_METHOD("update_script_classes"), &EditorFileSystem::update_script_classes); + ClassDB::bind_method(D_METHOD("reimport_files", "files"), &EditorFileSystem::reimport_files); ADD_SIGNAL(MethodInfo("filesystem_changed")); ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist"))); |