WIP checkpoint: fix static registry, uint32 type, GLTF API calls, ARRAY_BONES, missing slot handler
- avatar_slot_registry.gd: _slot_data/_slot_definitions made static (every caller uses AvatarSlotRegistry.method() on the class, never an instance, so the old instance _init() populating them was never invoked); moved registry build to static func _static_init() - avatar_catalog.gd: compute_loadout_hash() return type uint32 -> int (GDScript has no fixed-width uint type) - avatar_loader.gd: GLTFDocument.parse() (doesn't exist) -> the real append_from_buffer()+generate_scene() API; Error.parse_error() (doesn't exist) -> error_string(); Mesh.ARRAY_JOINTS (doesn't exist) -> Mesh.ARRAY_BONES; removed a dead 'mesh is MultiMesh' check that can never be true (MeshInstance3D.mesh is always Mesh, never MultiMesh); fixed _merge_node_into_avatar to recurse into a Skeleton3D's children (skinned meshes are commonly children of the skeleton in a GLB export, the old code returned before ever reaching them) - avatar_customization_ui.gd: added the missing _on_slot_button_pressed handler (referenced by a button connect, never defined -- just calls the existing _select_slot()) Verified: godot --headless --import + --quit is fully clean, and the avatar_customization.tscn scene now instantiates successfully. Remaining, scoped separately: avatar_visualizer.gd calls a AvatarLoader.load_slot() static async API and SlotItem/SlotResult types that don't exist -- AvatarLoader's real API (matching the project's own avatar.md spec: one canonical skeleton, attachments retargeted onto it) is instance-based load_base_body()/load_attachment(). AvatarVisualizer needs rewriting to use that real API; it's the one out of step with spec, not AvatarLoader.
This commit is contained in:
@@ -326,6 +326,11 @@ func _populate_items() -> void:
|
||||
# Slot selection
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
## Handle a slot button press.
|
||||
func _on_slot_button_pressed(slot_id: String) -> void:
|
||||
_select_slot(slot_id)
|
||||
|
||||
|
||||
## Select a slot and refresh the item list.
|
||||
func _select_slot(slot_id: String) -> void:
|
||||
_selected_slot = slot_id
|
||||
|
||||
Reference in New Issue
Block a user