From cd2a4990844fac72ae624a51bb797716e69ce2c3 Mon Sep 17 00:00:00 2001 From: reduz Date: Sun, 14 Nov 2021 14:02:38 -0300 Subject: Add path to functions that return iporter options -Allows displaying custom options for specific file format variants -Added support for scene format import to retrieve custom options This PR is necessary for #54886 to be implemented properly. --- editor/editor_file_system.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/editor_file_system.cpp') diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 3d6b523733..d141447044 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -1633,7 +1633,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector Ref importer = ResourceFormatImporter::get_singleton()->get_importer_by_name(importer_name); ERR_FAIL_COND_V(!importer.is_valid(), ERR_FILE_CORRUPT); List options; - importer->get_import_options(&options); + importer->get_import_options(p_files[i], &options); //set default values for (const ResourceImporter::ImportOption &E : options) { source_file_options[p_files[i]][E.option.name] = E.default_value; @@ -1714,7 +1714,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector //store options in provided order, to avoid file changing. Order is also important because first match is accepted first. List options; - importer->get_import_options(&options); + importer->get_import_options(file, &options); //set default values for (const ResourceImporter::ImportOption &F : options) { String base = F.option.name; @@ -1851,7 +1851,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const Map opts; - importer->get_import_options(&opts); + importer->get_import_options(p_file, &opts); for (const ResourceImporter::ImportOption &E : opts) { if (!params.has(E.option.name)) { //this one is not present params[E.option.name] = E.default_value; -- cgit v1.2.3