diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-01-31 15:59:52 +0100 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-02-01 12:27:50 +0100 |
commit | 91c3066c89e647e7edba3f88dd08cdb7e464f9ab (patch) | |
tree | edf71e09b4dfd460dd52d0d958a1428f5acbbcb3 /doc | |
parent | e1648b3327431a09cc9498663fac483275eb711d (diff) |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/EditorImportPlugin.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index ec9efcc9c4..a71d283e49 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -221,5 +221,14 @@ This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. </description> </method> + <method name="append_import_external_resource"> + <return type="int" enum="Error" /> + <param index="0" name="path" type="String" /> + <param index="1" name="custom_options" type="Dictionary" default="{}" /> + <param index="2" name="custom_importer" type="String" default="""" /> + <description> + This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. + </description> + </method> </methods> </class> |