From 7762d4592d5f8e28c0ae712db6ab589be2c57eaf Mon Sep 17 00:00:00 2001 From: Shatur95 Date: Mon, 22 Mar 2021 22:37:26 +0200 Subject: Remove hardcoded names in generated objects --- editor/import/resource_importer_scene.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index dba6ee3fac..4eba609c0d 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -382,7 +382,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_shape(E->get()); col->add_child(cshape); - cshape->set_name("shape" + itos(idx)); cshape->set_owner(col->get_owner()); idx++; } @@ -402,22 +401,18 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_size(Vector3(2, 2, 2)); colshape->set_shape(boxShape); - colshape->set_name("BoxShape3D"); } else if (empty_draw_type == "SINGLE_ARROW") { RayShape3D *rayShape = memnew(RayShape3D); rayShape->set_length(1); colshape->set_shape(rayShape); - colshape->set_name("RayShape3D"); Object::cast_to(sb)->rotate_x(Math_PI / 2); } else if (empty_draw_type == "IMAGE") { WorldMarginShape3D *world_margin_shape = memnew(WorldMarginShape3D); colshape->set_shape(world_margin_shape); - colshape->set_name("WorldMarginShape3D"); } else { SphereShape3D *sphereShape = memnew(SphereShape3D); sphereShape->set_radius(1); colshape->set_shape(sphereShape); - colshape->set_name("SphereShape3D"); } sb->add_child(colshape); colshape->set_owner(sb->get_owner()); @@ -444,7 +439,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapreplace_by(rigid_body); rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; - mi->set_name("mesh"); mi->set_transform(Transform()); rigid_body->add_child(mi); mi->set_owner(rigid_body->get_owner()); @@ -455,7 +449,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_shape(E->get()); rigid_body->add_child(cshape); - cshape->set_name("shape" + itos(idx)); cshape->set_owner(p_node->get_owner()); idx++; } @@ -493,7 +486,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_name("static_collision"); mi->add_child(col); col->set_owner(mi->get_owner()); @@ -503,7 +495,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_shape(E->get()); col->add_child(cshape); - cshape->set_name("shape" + itos(idx)); cshape->set_owner(p_node->get_owner()); idx++; @@ -552,7 +543,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_name("static_collision"); p_node->add_child(col); col->set_owner(p_node->get_owner()); @@ -562,7 +552,6 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Mapset_shape(E->get()); col->add_child(cshape); - cshape->set_name("shape" + itos(idx)); cshape->set_owner(p_node->get_owner()); idx++; } @@ -665,7 +654,6 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Mapset_name("Collider"); p_node->add_child(col); base = col; } break; @@ -675,7 +663,6 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Mapreplace_by(rigid_body); rigid_body->set_transform(mi->get_transform()); p_node = rigid_body; - mi->set_name("mesh"); mi->set_transform(Transform()); rigid_body->add_child(mi); mi->set_owner(rigid_body->get_owner()); @@ -708,7 +695,6 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Mapset_shape(E->get()); base->add_child(cshape); - cshape->set_name("shape" + itos(idx)); cshape->set_owner(base->get_owner()); idx++; } -- cgit v1.2.3