From cf918406ae5714d9713eab2a2be6361ef417eb5f Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 9 Aug 2022 22:31:17 +0200 Subject: [PATCH] Renamed Skeleton's skeleton_updated signal to pose_updated to make the following backports that much easier. --- .../skeleton_editor/skeleton_editor_plugin.cpp | 6 +++--- scene/3d/mesh_instance.cpp | 16 ++++++++-------- scene/3d/skeleton.cpp | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/skeleton_editor/skeleton_editor_plugin.cpp b/modules/skeleton_editor/skeleton_editor_plugin.cpp index d0dd3099a..f623e96af 100644 --- a/modules/skeleton_editor/skeleton_editor_plugin.cpp +++ b/modules/skeleton_editor/skeleton_editor_plugin.cpp @@ -816,7 +816,7 @@ void ModuleSkeletonEditor::create_editors() { if (skeleton) { skeleton->add_child(pointsm); pointsm->set_skeleton_path(NodePath("")); - skeleton->connect("skeleton_updated", this, "_draw_handles"); + skeleton->connect("pose_updated", this, "_draw_handles"); } const Color section_color = get_color("prop_subsection", "Editor"); @@ -881,7 +881,7 @@ void ModuleSkeletonEditor::_notification(int p_what) { joint_tree->connect("item_rmb_selected", this, "_joint_tree_rmb_select"); #ifdef TOOLS_ENABLED - skeleton->connect("skeleton_updated", this, "_update_properties"); + skeleton->connect("pose_updated", this, "_update_properties"); #endif // TOOLS_ENABLED break; @@ -1037,7 +1037,7 @@ ModuleSkeletonEditor::~ModuleSkeletonEditor() { if (skeleton) { pointsm->get_parent()->remove_child(pointsm); skeleton->set_selected_bone(-1); - skeleton->disconnect("skeleton_updated", this, "_draw_handles"); + skeleton->disconnect("pose_updated", this, "_draw_handles"); memdelete(pointsm); } for (int i = 0; i < 2; i++) { diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 6f16639f1..a7c21d099 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -122,7 +122,7 @@ void MeshInstance::set_mesh(const Ref &p_mesh) { if (skin_ref.is_valid() && mesh.is_valid() && _is_software_skinning_enabled() && is_visible_in_tree()) { ERR_FAIL_COND(!skin_ref->get_skeleton_node()); - skin_ref->get_skeleton_node()->disconnect("skeleton_updated", this, "_update_skinning"); + skin_ref->get_skeleton_node()->disconnect("pose_updated", this, "_update_skinning"); } if (software_skinning) { @@ -174,7 +174,7 @@ void MeshInstance::_resolve_skeleton_path() { if (skin_ref.is_valid() && mesh.is_valid() && _is_software_skinning_enabled() && is_visible_in_tree()) { ERR_FAIL_COND(!skin_ref->get_skeleton_node()); - skin_ref->get_skeleton_node()->disconnect("skeleton_updated", this, "_update_skinning"); + skin_ref->get_skeleton_node()->disconnect("pose_updated", this, "_update_skinning"); } skin_ref = new_skin_reference; @@ -219,8 +219,8 @@ void MeshInstance::_initialize_skinning(bool p_force_reset, bool p_call_attach_s if (_is_software_skinning_enabled()) { if (is_visible_in_tree()) { ERR_FAIL_COND(!skin_ref->get_skeleton_node()); - if (!skin_ref->get_skeleton_node()->is_connected("skeleton_updated", this, "_update_skinning")) { - skin_ref->get_skeleton_node()->connect("skeleton_updated", this, "_update_skinning"); + if (!skin_ref->get_skeleton_node()->is_connected("pose_updated", this, "_update_skinning")) { + skin_ref->get_skeleton_node()->connect("pose_updated", this, "_update_skinning"); } } @@ -332,8 +332,8 @@ void MeshInstance::_initialize_skinning(bool p_force_reset, bool p_call_attach_s } } else { ERR_FAIL_COND(!skin_ref->get_skeleton_node()); - if (skin_ref->get_skeleton_node()->is_connected("skeleton_updated", this, "_update_skinning")) { - skin_ref->get_skeleton_node()->disconnect("skeleton_updated", this, "_update_skinning"); + if (skin_ref->get_skeleton_node()->is_connected("pose_updated", this, "_update_skinning")) { + skin_ref->get_skeleton_node()->disconnect("pose_updated", this, "_update_skinning"); } if (p_call_attach_skeleton) { @@ -671,9 +671,9 @@ void MeshInstance::_notification(int p_what) { if (skin_ref.is_valid() && mesh.is_valid() && _is_software_skinning_enabled()) { ERR_FAIL_COND(!skin_ref->get_skeleton_node()); if (is_visible_in_tree()) { - skin_ref->get_skeleton_node()->connect("skeleton_updated", this, "_update_skinning"); + skin_ref->get_skeleton_node()->connect("pose_updated", this, "_update_skinning"); } else { - skin_ref->get_skeleton_node()->disconnect("skeleton_updated", this, "_update_skinning"); + skin_ref->get_skeleton_node()->disconnect("pose_updated", this, "_update_skinning"); } } } diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index f76e7c542..8a90658d5 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -347,7 +347,7 @@ void Skeleton::_notification(int p_what) { } dirty = false; - emit_signal("skeleton_updated"); + emit_signal("pose_updated"); } break; #ifndef _3D_DISABLED @@ -1047,7 +1047,7 @@ void Skeleton::_bind_methods() { #endif // _3D_DISABLED - ADD_SIGNAL(MethodInfo("skeleton_updated")); + ADD_SIGNAL(MethodInfo("pose_updated")); BIND_CONSTANT(NOTIFICATION_UPDATE_SKELETON);