mirror of
https://github.com/godotengine/godot.git
synced 2025-02-05 21:41:47 +08:00
Fix errors when undoing collision generation for multiple meshes with different parents
This commit is contained in:
parent
2b7ea6223b
commit
5b19f729c2
@ -188,12 +188,12 @@ void MeshInstance3DEditor::_create_collision_shape() {
|
||||
CollisionShape3D *cshape = memnew(CollisionShape3D);
|
||||
cshape->set_shape(shape);
|
||||
cshape->set_name("CollisionShape3D");
|
||||
cshape->set_transform(node->get_transform());
|
||||
cshape->set_transform(instance->get_transform());
|
||||
ur->add_do_method(E, "add_sibling", cshape, true);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringName(_request_gizmo), cshape);
|
||||
ur->add_do_reference(cshape);
|
||||
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
|
||||
ur->add_undo_method(instance->get_parent(), "remove_child", cshape);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user