Support reimport appending

* Add API: `EditorFileSystem::reimport_append(path)`, thread safe, what can be used from importers when they generate new files within the import process.
* Added a `remap.gen_param` custom value to .import files, which can be used by importers to store data needed to generate this file again or not.

This API is added to allow the GLTF2 importer to properly extract png files as textures.
This commit is contained in:
Juan Linietsky 2023-01-31 15:59:52 +01:00
parent e1648b3327
commit 91c3066c89
5 changed files with 55 additions and 12 deletions

View file

@ -242,7 +242,7 @@ class EditorFileSystem : public Node {
void _update_extensions();
void _reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options = nullptr, const String &p_custom_importer = String());
Error _reimport_file(const String &p_file, const HashMap<StringName, Variant> *p_custom_options = nullptr, const String &p_custom_importer = String());
Error _reimport_group(const String &p_group_file, const Vector<String> &p_files);
bool _test_for_reimport(const String &p_path, bool p_only_imported_files);
@ -315,6 +315,7 @@ public:
EditorFileSystemDirectory *find_file(const String &p_file, int *r_index) const;
void reimport_files(const Vector<String> &p_files);
Error reimport_append(const String &p_file, const HashMap<StringName, Variant> &p_custom_options, const String &p_custom_importer = String());
void reimport_file_with_custom_parameters(const String &p_file, const String &p_importer, const HashMap<StringName, Variant> &p_custom_params);