diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-03 17:33:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-03 17:33:48 +0100 |
commit | f6732ff1646d116f3754c82e6935f2ddc20d58c8 (patch) | |
tree | a96aeee0c03fa1fd13e46bf32baca6a1a667364a | |
parent | 49573817b86428332292aa249e0e2da1b74018ee (diff) | |
parent | 79ca8e7305db103078d8afa2a17ba95289962d41 (diff) |
Merge pull request #24062 from asheraryam/feature/editor_instance_natural_names
Use filename instead of the class name for drag & drop Mesh Instance.
-rw-r--r-- | editor/plugins/spatial_editor_plugin.cpp | 2 |
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 |