feat: update
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
extends SceneTree
|
||||
|
||||
func _init() -> void:
|
||||
var lib = load("res://assets/characters/animations/dasher-pack.res") as AnimationLibrary
|
||||
if not lib:
|
||||
quit(1)
|
||||
return
|
||||
|
||||
var anim_name = "dasher_hit"
|
||||
if lib.has_animation(anim_name):
|
||||
var anim = lib.get_animation(anim_name)
|
||||
print("Animation: ", anim_name)
|
||||
var has_pos = 0
|
||||
var has_rot = 0
|
||||
var has_scale = 0
|
||||
var pos_bones = []
|
||||
|
||||
for i in anim.get_track_count():
|
||||
var type = anim.track_get_type(i)
|
||||
var path = anim.track_get_path(i)
|
||||
if type == Animation.TYPE_POSITION_3D:
|
||||
has_pos += 1
|
||||
pos_bones.append(str(path))
|
||||
elif type == Animation.TYPE_ROTATION_3D:
|
||||
has_rot += 1
|
||||
elif type == Animation.TYPE_SCALE_3D:
|
||||
has_scale += 1
|
||||
|
||||
print(" Positions: ", has_pos, " (", pos_bones, ")")
|
||||
print(" Rotations: ", has_rot)
|
||||
print(" Scales: ", has_scale)
|
||||
|
||||
quit(0)
|
||||
Reference in New Issue
Block a user