Baltor Get started

Gallery / Asset contracts

Godot .tscn and .tres parser and linter

In your harnessAsset contractMIT

Parse Godot 4 text scenes and resources and find what fails or silently vanishes on load: missing resource files, unknown or forward resource ids, missing node parents, repeated sibling names, untyped nodes, broken connections, several roots, syntax and format errors.

Files, names only

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • asset_report.py
  • component.json
  • fixtures/project/materials/bad_brass_missing_texture.tres
  • fixtures/project/materials/wood.tres
  • fixtures/project/project.godot
  • fixtures/project/scenes/bad_connection.tscn
  • fixtures/project/scenes/bad_duplicate_sibling.tscn
  • fixtures/project/scenes/bad_forward_sub_resource.tscn
  • fixtures/project/scenes/bad_future_format.tscn
  • fixtures/project/scenes/bad_missing_material.tscn
  • fixtures/project/scenes/bad_parent_path.tscn
  • fixtures/project/scenes/bad_syntax.tscn
  • fixtures/project/scenes/bad_two_roots.tscn
  • fixtures/project/scenes/bad_unknown_ext_id.tscn
  • fixtures/project/scenes/bad_unknown_sub_id.tscn
  • fixtures/project/scenes/bad_untyped_node.tscn
  • fixtures/project/scenes/door.tscn
  • fixtures/project/scenes/godot3_door.tscn
  • fixtures/project/scenes/room.tscn
  • fixtures/project/scripts/door_controller.gd
  • gltfio.py
  • godot_scene_linter.py
  • pngio.py
  • schema_lite.py
  • test_godot_scene_linter.py
  • test_package.py
  • verification/native.json

Full files in your harness.

What it takes and gives

Entry points
parse, node_paths, lint, run, main
Proves
The file parses; every res:// external resource exists under the project root; every ExtResource and SubResource id is declared, sub-resources before their first use; the scene has one root, every node a known parent (including nodes of instanced scenes), a type or an instance, and a unique name among its siblings; every connection joins existing nodes.
Does not prove
That property values are valid for their class, that scripts compile, that signals and methods exist, or that uid:// references resolve (the uid cache is not read).
Catches
file_unreadable, syntax_invalid, header_invalid, format_unsupported, ext_resource_invalid, ext_resource_id_repeated, ext_resource_missing_file, ext_resource_reference_unknown and 9 more

Limits. Resources are checked by res:// path only; uid-only references are not resolved. Property values are scanned for ExtResource and SubResource references but not type-checked. Signals and methods named by connections are not checked. Nodes inside instanced scenes are found by parsing those scenes (eight levels deep at most). Godot 3 scenes (format 2) are parsed with a warning, because Godot 4.7 converts their class names on load.

Details

Kind
Asset contract
Engine
Python 3.10 or later
Files
30 files, 132.8 KB
Licence
MIT
Declared effects
reads files, runs commands
Checks
checker matches contract, godot loads known good files as parsed, each known wrong file has a visible effect in godot
Techniques
Godot 4 text scene and resource format: sections, header attributes, multi-line values, Bracket and string aware scanning of multi-line values, Scene tree path resolution with instanced sub-scenes
Tags
godot, tscn, tres, linter, parser, scene, references, ci check
Identity
library.supply.creative_originals.7365e10861d200abf32ef393.04537202fc3186da
Version
04537202fc3186da216ee399722c4c0cf275246bfeb4e195ec25d66bdc45ae3a

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.