From 79ca8e7305db103078d8afa2a17ba95289962d41 Mon Sep 17 00:00:00 2001 From: asheraryam Date: Thu, 29 Nov 2018 22:14:53 +0200 Subject: Use filename as fallback instead of the class name for mesh instance loaded by dragging from file to editor. --- editor/plugins/spatial_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor') diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index a5563c0497..cc5f50a834 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -3238,7 +3238,7 @@ bool SpatialEditorViewport::_create_instance(Node *parent, String &path, const P if (mesh != NULL) { MeshInstance *mesh_instance = memnew(MeshInstance); mesh_instance->set_mesh(mesh); - mesh_instance->set_name(mesh->get_name()); + mesh_instance->set_name(path.get_file().get_basename()); instanced_scene = mesh_instance; } else { if (!scene.is_valid()) { // invalid scene -- cgit v1.2.3