summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-12-03 17:33:48 +0100
committerGitHub <noreply@github.com>2018-12-03 17:33:48 +0100
commitf6732ff1646d116f3754c82e6935f2ddc20d58c8 (patch)
treea96aeee0c03fa1fd13e46bf32baca6a1a667364a /editor
parent49573817b86428332292aa249e0e2da1b74018ee (diff)
parent79ca8e7305db103078d8afa2a17ba95289962d41 (diff)
Merge pull request #24062 from asheraryam/feature/editor_instance_natural_names
Use filename instead of the class name for drag & drop Mesh Instance.
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
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