18 lines
476 B
GDScript
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
|
|
)
|