Merge pull request #69947 from Sauermann/fix-request-gizmo-strings
Use _request_gizmo from SceneStringNames
This commit is contained in:
commit
9562cfbf4b
2 changed files with 13 additions and 11 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "scene/gui/menu_button.h"
|
||||
#include "scene/resources/concave_polygon_shape_3d.h"
|
||||
#include "scene/resources/convex_polygon_shape_3d.h"
|
||||
#include "scene/scene_string_names.h"
|
||||
|
||||
void MeshInstance3DEditor::_node_removed(Node *p_node) {
|
||||
if (p_node == node) {
|
||||
|
@ -87,8 +88,8 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
|||
ur->add_do_method(node, "add_child", body, true);
|
||||
ur->add_do_method(body, "set_owner", owner);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", body);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, body);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
ur->add_do_reference(body);
|
||||
ur->add_undo_method(node, "remove_child", body);
|
||||
ur->commit_action();
|
||||
|
@ -123,8 +124,8 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
|||
ur->add_do_method(instance, "add_child", body, true);
|
||||
ur->add_do_method(body, "set_owner", owner);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", body);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, body);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
ur->add_do_reference(body);
|
||||
ur->add_undo_method(instance, "remove_child", body);
|
||||
}
|
||||
|
@ -158,7 +159,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
|||
ur->add_do_method(node->get_parent(), "add_child", cshape, true);
|
||||
ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
ur->add_do_reference(cshape);
|
||||
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
|
||||
ur->commit_action();
|
||||
|
@ -198,7 +199,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
|||
ur->add_do_method(node->get_parent(), "add_child", cshape, true);
|
||||
ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
ur->add_do_reference(cshape);
|
||||
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
|
||||
|
||||
|
@ -237,7 +238,7 @@ void MeshInstance3DEditor::_menu_option(int p_option) {
|
|||
ur->add_do_method(node->get_parent(), "add_child", cshape);
|
||||
ur->add_do_method(node->get_parent(), "move_child", cshape, node->get_index() + 1);
|
||||
ur->add_do_method(cshape, "set_owner", owner);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", cshape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, cshape);
|
||||
ur->add_do_reference(cshape);
|
||||
ur->add_undo_method(node->get_parent(), "remove_child", cshape);
|
||||
}
|
||||
|
@ -263,7 +264,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(), "_request_gizmo", nmi);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, nmi);
|
||||
|
||||
ur->add_do_reference(nmi);
|
||||
ur->add_undo_method(node, "remove_child", nmi);
|
||||
|
@ -498,7 +499,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(), "_request_gizmo", mi);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, mi);
|
||||
|
||||
ur->add_do_reference(mi);
|
||||
ur->add_undo_method(node, "remove_child", mi);
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#include "scene/resources/skeleton_profile.h"
|
||||
#include "scene/resources/sphere_shape_3d.h"
|
||||
#include "scene/resources/surface_tool.h"
|
||||
#include "scene/scene_string_names.h"
|
||||
|
||||
void BoneTransformEditor::create_editors() {
|
||||
const Color section_color = get_theme_color(SNAME("prop_subsection"), SNAME("Editor"));
|
||||
|
@ -399,8 +400,8 @@ void Skeleton3DEditor::create_physical_skeleton() {
|
|||
ur->add_do_method(physical_bone, "set_joint_type", PhysicalBone3D::JOINT_TYPE_PIN);
|
||||
}
|
||||
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", physical_bone);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), "_request_gizmo", collision_shape);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, physical_bone);
|
||||
ur->add_do_method(Node3DEditor::get_singleton(), SceneStringNames::get_singleton()->_request_gizmo, collision_shape);
|
||||
|
||||
ur->add_do_reference(physical_bone);
|
||||
ur->add_undo_method(skeleton, "remove_child", physical_bone);
|
||||
|
|
Loading…
Reference in a new issue