โ† All examples

asset contracts

glTF 2.0 structural validator

Check that a .gltf or .glb file is internally consistent before an engine loads it: buffers, views, accessors, indices, materials, textures, the node graph, skins and animation samplers. Run it after every export and before every import.

What this component contains

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • asset_report.py
  • component.json
  • fixtures/bad_accessor_out_of_bounds.gltf
  • fixtures/bad_attribute_counts.gltf
  • fixtures/bad_buffer_length.gltf
  • fixtures/bad_cubic_output_count.gltf
  • fixtures/bad_index_out_of_range.gltf
  • fixtures/bad_inverse_bind_count.gltf
  • fixtures/bad_key_times.gltf
  • fixtures/bad_node_cycle.gltf
  • fixtures/bad_position_bounds.gltf
  • fixtures/bad_rotation_not_unit.gltf
  • fixtures/bad_skin_attributes_missing.gltf
  • fixtures/bad_texture_reference.gltf
  • fixtures/good_door.gltf
  • fixtures/good_skinned_strip.gltf
  • gltf_structural_validator.py
  • gltfio.py
  • pngio.py
  • schema_lite.py
  • test_gltf_structural_validator.py
  • test_package.py
  • verification/native.json

How it works

Entry points
validate_file, validate, run, main
Proves
Every index the file uses points at an existing entry; every accessor lies inside its buffer view and buffer, is aligned, and its declared min and max equal the data; primitives have consistent attribute counts and in-range indices; the node graph is a forest with one parent per node; skins and animation samplers have the counts and types the glTF 2.0 data model requires.
Does not prove
That the asset looks right, has sensible dimensions, names or materials, that its extensions are supported by a given engine, that textures decode, or that animation motion is plausible. It is not the Khronos glTF-Validator and does not implement every rule of the specification.
Catches
file_unreadable, json_invalid, asset_header_invalid, asset_version_unsupported, property_type_invalid, extension_required_not_used, buffer_invalid, buffer_unresolved and 61 more

Recorded checks

blender_and_godot blender 5.2.1 LTS (hash 9e2066aef7ef built 2026-08-25 02:12:34); godot 4.7.2.stable.official.ed1daf0bf

  • checker_matches_contract
  • godot_agrees_on_known_good
  • blender_agrees_on_known_good
  • known_wrong_refused_with_engine_reactions

Limits to consider

Pure Python: an asset with one million vertices and one million indices took about 8 seconds on the build host under load (October 9, 2026). Extension contents (KHR_*, EXT_*) are not validated, only extensionsRequired against extensionsUsed. Images are checked for existence and PNG or JPEG magic bytes, not decoded. Sparse accessors, matrix column padding and GLB containers are supported. Animation pointer targets are accepted without further checks. Rules of the specification outside the listed failure codes are not checked.