Add import tab "import_script/path" relative path support

This commit is contained in:
Adam Scott 2024-08-25 12:48:32 -04:00
parent e3550cb20f
commit 7e580150f9
No known key found for this signature in database
GPG Key ID: F6BA2A0302E21A77
1 changed files with 4 additions and 0 deletions

View File

@ -3058,6 +3058,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
progress.step(TTR("Running Custom Script..."), 2);
String post_import_script_path = p_options["import_script/path"];
if (post_import_script_path.is_relative_path()) {
post_import_script_path = p_source_file.get_base_dir().path_join(post_import_script_path);
}
Ref<EditorScenePostImport> post_import_script;
if (!post_import_script_path.is_empty()) {