diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp index e2591811875..d0d7142c01d 100644 --- a/editor/import/3d/resource_importer_scene.cpp +++ b/editor/import/3d/resource_importer_scene.cpp @@ -3058,13 +3058,13 @@ 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 post_import_script; 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