batrix/scripts/effects/discrete_animation_player.gd
2025-02-27 01:57:20 +10:00

18 lines
476 B
GDScript

## https://forum.godotengine.org/t/how-to-set-all-3d-animation-tracks-to-nearest-interpolation/22056/4
@tool
extends AnimationPlayer
func _ready() -> void:
interpolation_change()
func interpolation_change() -> void:
for animation in get_animation_list():
var anim_track_1: Animation = get_animation(animation)
var count: int = anim_track_1.get_track_count()
for i in count:
anim_track_1.track_set_interpolation_type(
i, Animation.INTERPOLATION_NEAREST
)