From be1acfa2ad3d3109111eb859d686b16dc36f3283 Mon Sep 17 00:00:00 2001 From: Malcolm Nixon Date: Thu, 4 Jul 2024 20:16:58 -0400 Subject: [PATCH] Fix custom hand poses triggering legacy remove_animation call on AnimationPlayer. --- VERSIONS.md | 1 + addons/godot-xr-tools/hands/hand.gd | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSIONS.md b/VERSIONS.md index c3e1a5bf..79990ca5 100644 --- a/VERSIONS.md +++ b/VERSIONS.md @@ -1,5 +1,6 @@ # 4.4.0 - Minimum Godot version changed to 4.2 +- Fix custom hand poses calling legacy remove_animation # 4.3.3 - Fix Viewport2Din3D property forwarding diff --git a/addons/godot-xr-tools/hands/hand.gd b/addons/godot-xr-tools/hands/hand.gd index b1a5f70c..339e5f10 100644 --- a/addons/godot-xr-tools/hands/hand.gd +++ b/addons/godot-xr-tools/hands/hand.gd @@ -339,7 +339,7 @@ func _update_pose() -> void: if open_name == "": open_name = "open_hand" if _animation_player.has_animation(open_name): - _animation_player.remove_animation(open_name) + _animation_player.get_animation_library("").remove_animation(open_name) _animation_player.get_animation_library("").add_animation(open_name, open_pose) @@ -353,7 +353,7 @@ func _update_pose() -> void: if closed_name == "": closed_name = "closed_hand" if _animation_player.has_animation(closed_name): - _animation_player.remove_animation(closed_name) + _animation_player.get_animation_library("").remove_animation(closed_name) _animation_player.get_animation_library("").add_animation(closed_name, closed_pose)