|
@@ -3058,13 +3058,13 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
|
|
progress.step(TTR("Running Custom Script..."), 2);
|
|
progress.step(TTR("Running Custom Script..."), 2);
|
|
|
|
|
|
String post_import_script_path = p_options["import_script/path"];
|
|
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;
|
|
Ref<EditorScenePostImport> post_import_script;
|
|
|
|
|
|
if (!post_import_script_path.is_empty()) {
|
|
if (!post_import_script_path.is_empty()) {
|
|
|
|
+ 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<Script> scr = ResourceLoader::load(post_import_script_path);
|
|
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
|
|
if (!scr.is_valid()) {
|
|
if (!scr.is_valid()) {
|
|
EditorNode::add_io_error(TTR("Couldn't load post-import script:") + " " + post_import_script_path);
|
|
EditorNode::add_io_error(TTR("Couldn't load post-import script:") + " " + post_import_script_path);
|