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:
@@ -156,8 +156,9 @@ func validate_loadout(loadout: AvatarLoadout) -> Dictionary:
|
||||
|
||||
|
||||
## Compute a hash of the loadout for change detection.
|
||||
## Returns a uint32 hash.
|
||||
static func compute_loadout_hash(loadout: AvatarLoadout) -> uint32:
|
||||
## Returns a 32-bit hash value (GDScript has no fixed-width uint type — int
|
||||
## is 64-bit signed, the value is just constrained to 32 bits of range).
|
||||
static func compute_loadout_hash(loadout: AvatarLoadout) -> int:
|
||||
var hasher = HashingContext.new()
|
||||
hasher.start(HashingContext.HASH_SHA256)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user