From 25074c734d1dc6012b7611de34d35284eb56c833 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 (cherry picked from commit 82fadde680c9377e0a8da023a66c921174c97aff) --- 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 fb2e3c0401a..9badc366108 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1257,7 +1257,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;