add bone flattener
This commit is contained in:
17
scripts/effects/discrete_animation_player.gd
Normal file
17
scripts/effects/discrete_animation_player.gd
Normal file
@@ -0,0 +1,17 @@
|
||||
## 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
|
||||
)
|
||||
Reference in New Issue
Block a user