You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add shorthand for using singleton string names
This commit is contained in:
@@ -172,14 +172,14 @@ void MeshInstance3DEditor::_create_collision_shape() {
|
||||
|
||||
ur->add_do_method(instance, "add_child", body, true);
|
||||
ur->add_do_method(body, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, body);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringName(_request_gizmo), body);
|
||||
|
||||
for (Ref<Shape3D> shape : shapes) {
|
||||
CollisionShape3D *cshape = memnew(CollisionShape3D);
|
||||
cshape->set_shape(shape);
|
||||
body->add_child(cshape, true);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringName(_request_gizmo), cshape);
|
||||
}
|
||||
ur->add_do_reference(body);
|
||||
ur->add_undo_method(instance, "remove_child", body);
|
||||
@@ -191,7 +191,7 @@ void MeshInstance3DEditor::_create_collision_shape() {
|
||||
cshape->set_transform(node->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(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
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);
|
||||
}
|
||||
@@ -232,7 +232,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
||||
|
||||
ur->add_do_method(node, "add_child", nmi, true);
|
||||
ur->add_do_method(nmi, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, nmi);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringName(_request_gizmo), nmi);
|
||||
|
||||
ur->add_do_reference(nmi);
|
||||
ur->add_undo_method(node, "remove_child", nmi);
|
||||
@@ -509,7 +509,7 @@ void MeshInstance3DEditor::_create_outline_mesh() {
|
||||
|
||||
ur->add_do_method(node, "add_child", mi, true);
|
||||
ur->add_do_method(mi, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, mi);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringName(_request_gizmo), mi);
|
||||
|
||||
ur->add_do_reference(mi);
|
||||
ur->add_undo_method(node, "remove_child", mi);
|
||||
|
||||
Reference in New Issue
Block a user