Merge pull request #27453 from KoBeWi/glhf_scene_root

Use filename for scene root of imported models
This commit is contained in:
Rémi Verschelde 2019-04-30 11:38:32 +02:00 committed by GitHub
commit 6ee5f7c881
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1290,7 +1290,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
Object::cast_to<Spatial>(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;