Tweak the error message displayd when a post-import script fails

See #38662.
This commit is contained in:
Hugo Locurcio 2020-05-11 21:09:36 +02:00
parent 6d46d2fe27
commit 0d7b627936
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
1 changed files with 3 additions and 1 deletions

View File

@ -1582,7 +1582,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
post_import_script->init(base_path, p_source_file);
scene = post_import_script->post_import(scene);
if (!scene) {
EditorNode::add_io_error(TTR("Error running post-import script:") + " " + post_import_script_path);
EditorNode::add_io_error(
TTR("Error running post-import script:") + " " + post_import_script_path + "\n" +
TTR("Did you return a Node-derived object in the `post_import()` method?"));
return err;
}
}