summaryrefslogtreecommitdiff
path: root/editor/import/resource_importer_scene.cpp
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-10-21 16:46:07 +0200
committerkobewi <kobewi4e@gmail.com>2021-10-28 01:43:34 +0200
commitde4f29f458fd07d9fb132e38662359e2850c566c (patch)
tree97098883d5c6feb0d7edb0abb763d716b657ac83 /editor/import/resource_importer_scene.cpp
parent9c9ec63e1dbd33cace4a988783f1130b4c3f06ad (diff)
Remove node_hrcr hack
Diffstat (limited to 'editor/import/resource_importer_scene.cpp')
-rw-r--r--editor/import/resource_importer_scene.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 319e5ee25f..18461593f2 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -501,7 +501,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
sphereShape->set_radius(1);
colshape->set_shape(sphereShape);
}
- sb->add_child(colshape);
+ sb->add_child(colshape, true);
colshape->set_owner(sb->get_owner());
}
@@ -527,7 +527,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
rigid_body->set_transform(mi->get_transform());
p_node = rigid_body;
mi->set_transform(Transform3D());
- rigid_body->add_child(mi);
+ rigid_body->add_child(mi, true);
mi->set_owner(rigid_body->get_owner());
_add_shapes(rigid_body, shapes);
@@ -565,7 +565,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
if (shapes.size()) {
StaticBody3D *col = memnew(StaticBody3D);
- mi->add_child(col);
+ mi->add_child(col, true);
col->set_owner(mi->get_owner());
_add_shapes(col, shapes);
@@ -613,7 +613,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, Map<Ref<I
if (shapes.size()) {
StaticBody3D *col = memnew(StaticBody3D);
- p_node->add_child(col);
+ p_node->add_child(col, true);
col->set_owner(p_node->get_owner());
_add_shapes(col, shapes);
@@ -748,7 +748,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
switch (mesh_physics_mode) {
case MESH_PHYSICS_MESH_AND_STATIC_COLLIDER: {
StaticBody3D *col = memnew(StaticBody3D);
- p_node->add_child(col);
+ p_node->add_child(col, true);
col->set_owner(p_node->get_owner());
col->set_transform(get_collision_shapes_transform(node_settings));
base = col;
@@ -760,7 +760,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
rigid_body->set_transform(mi->get_transform() * get_collision_shapes_transform(node_settings));
p_node = rigid_body;
mi->set_transform(Transform3D());
- rigid_body->add_child(mi);
+ rigid_body->add_child(mi, true);
mi->set_owner(rigid_body->get_owner());
base = rigid_body;
} break;
@@ -789,7 +789,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
for (const Ref<Shape3D> &E : shapes) {
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E);
- base->add_child(cshape);
+ base->add_child(cshape, true);
cshape->set_owner(base->get_owner());
idx++;
@@ -822,7 +822,7 @@ Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, Map<Ref<
memdelete(p_node);
p_node = nmi;
} else {
- mi->add_child(nmi);
+ mi->add_child(nmi, true);
nmi->set_owner(mi->get_owner());
}
}
@@ -1657,7 +1657,7 @@ void ResourceImporterScene::_add_shapes(Node *p_node, const Vector<Ref<Shape3D>>
for (const Ref<Shape3D> &E : p_shapes) {
CollisionShape3D *cshape = memnew(CollisionShape3D);
cshape->set_shape(E);
- p_node->add_child(cshape);
+ p_node->add_child(cshape, true);
cshape->set_owner(p_node->get_owner());
}