Skip to content

Commit

Permalink
Fix custom hand poses triggering legacy remove_animation call on Anim…
Browse files Browse the repository at this point in the history
…ationPlayer.
  • Loading branch information
Malcolmnixon committed Jul 5, 2024
1 parent 849177b commit be1acfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions addons/godot-xr-tools/hands/hand.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down

0 comments on commit be1acfa

Please sign in to comment.