feat: add rigged+animated Miku player model with auto-rig pipeline
- Add miku_rigged_animated.glb (3.27MB) with 18-bone skeleton and 6 animations (Idle, Walk, Run, Jump, Crouch, Death) via Blender auto-rig script - Add tools/rig_and_animate.py: reusable Blender script for rigging any humanoid mesh with Mixamo-compatible bone naming - Update SkinnedPlayerModel: scale_factor, first-person mode, animation state matching (Idle/Walk/Run/Jump/Crouch/Death) - Update level_runtime.gd: use skinned model for local player, procedural humanoid for remote players - Update skin_manager.gd and test_level_builder.gd to use animated model - Fix Godot 4.2.1 'is not Type' syntax in 5 weapon files - Add editor/import_miku_to_tscn.gd for editor-based GLB import
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
@tool
|
||||
extends EditorScript
|
||||
|
||||
func _run():
|
||||
var source = "res://assets/characters/skins/miku_rigged_final.glb"
|
||||
var dest = "res://assets/characters/skins/miku_rigged.tscn"
|
||||
|
||||
print("Loading %s..." % source)
|
||||
var glb = load(source)
|
||||
if not glb:
|
||||
print("ERROR: Failed to load GLB")
|
||||
return
|
||||
|
||||
print("Instantiating...")
|
||||
var scene = glb.instantiate()
|
||||
if not scene:
|
||||
print("ERROR: Failed to instantiate")
|
||||
return
|
||||
|
||||
print("Scene: %s" % scene.name)
|
||||
print("Children:")
|
||||
for child in scene.get_children():
|
||||
print(" %s (%s)" % [child.name, child.get_class()])
|
||||
if child is Skeleton3D:
|
||||
print(" Bones: %d" % child.get_bone_count())
|
||||
for i in range(child.get_bone_count()):
|
||||
var bone_name = child.get_bone_name(i)
|
||||
var rest = child.get_bone_global_rest(i)
|
||||
print(" %s: pos=%s" % [bone_name, rest.origin])
|
||||
if child is AnimationPlayer:
|
||||
print(" Animations: %s" % child.get_animation_list())
|
||||
|
||||
# Save as scene
|
||||
var packed = PackedScene.new()
|
||||
packed.pack(scene)
|
||||
ResourceSaver.save(packed, dest)
|
||||
print("Saved to %s" % dest)
|
||||
Reference in New Issue
Block a user