@@ -2963,15 +2963,6 @@ void ResourceImporterScene::_optimize_track_usage(AnimationPlayer *p_player, Ani
29632963 }
29642964}
29652965
2966- void ResourceImporterScene::_generate_editor_preview_for_scene (const String &p_path, Node *p_scene) {
2967- if (!Engine::get_singleton ()->is_editor_hint ()) {
2968- return ;
2969- }
2970- ERR_FAIL_COND_MSG (p_path.is_empty (), " Path is empty, cannot generate preview." );
2971- ERR_FAIL_NULL_MSG (p_scene, " Scene is null, cannot generate preview." );
2972- EditorInterface::get_singleton ()->make_scene_preview (p_path, p_scene, 1024 );
2973- }
2974-
29752966Node *ResourceImporterScene::pre_import (const String &p_source_file, const HashMap<StringName, Variant> &p_options) {
29762967 Ref<EditorSceneFormatImporter> importer;
29772968 String ext = p_source_file.get_extension ().to_lower ();
@@ -3359,7 +3350,7 @@ Error ResourceImporterScene::import(ResourceUID::ID p_source_id, const String &p
33593350 print_verbose (" Saving scene to: " + p_save_path + " .scn" );
33603351 err = ResourceSaver::save (packer, p_save_path + " .scn" , flags); // do not take over, let the changed files reload themselves
33613352 ERR_FAIL_COND_V_MSG (err != OK, err, " Cannot save scene to file '" + p_save_path + " .scn'." );
3362- _generate_editor_preview_for_scene ( p_source_file, scene);
3353+ EditorInterface::get_singleton ()-> make_scene_preview ( p_source_file, scene, 1024 );
33633354 } else {
33643355 ERR_FAIL_V_MSG (ERR_FILE_UNRECOGNIZED, " Unknown scene import type: " + _scene_import_type);
33653356 }
0 commit comments