From 82fadde680c9377e0a8da023a66c921174c97aff Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Mon, 8 Apr 2019 18:43:55 +0200 Subject: [PATCH] Use filename for scene root of imported models --- editor/import/resource_importer_scene.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 5eb1d2ec6ca..2f3d8cf58d6 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1256,7 +1256,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p Object::cast_to(scene)->scale(Vector3(root_scale, root_scale, root_scale)); } - scene->set_name(p_options["nodes/root_name"]); + if (p_options["nodes/root_name"] != "Scene Root") + scene->set_name(p_options["nodes/root_name"]); + else + scene->set_name(p_save_path.get_file().get_basename()); err = OK;