Renamed Skeleton's skeleton_updated signal to pose_updated to make the following backports that much easier.

This commit is contained in:
Relintai 2022-08-09 22:31:17 +02:00
parent 0ffa8e33a7
commit cf918406ae
3 changed files with 13 additions and 13 deletions

View File

@ -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++) {

View File

@ -122,7 +122,7 @@ void MeshInstance::set_mesh(const Ref<Mesh> &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");
}
}
}

View File

@ -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);