Merge pull request #24062 from asheraryam/feature/editor_instance_natural_names

Use filename instead of the class name for drag & drop Mesh Instance.
This commit is contained in:
Rémi Verschelde 2018-12-03 17:33:48 +01:00 committed by GitHub
commit f6732ff164
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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