Expand description
pite-assets: asset scan, uid manifest, rename detection, reimport.
Single assets.pite.toml manifest at the project root maps
res:// paths to opaque uids. Scans are content-aware: identical
bytes keep the uid across renames, changed bytes flag reimport.
Re-exports§
pub use atlas::atlas_report;pub use atlas::load_sidecar;pub use atlas::resolve_sprite_source;pub use atlas::sheet_path;pub use atlas::AtlasUse;pub use atlas::SpriteSource;
Modules§
- atlas
- Sprite-source rules (
texturevsatlas+frame) and project-wide atlas reference checks forpite check.
Structs§
- Asset
Entry - One manifest row: stable uid plus the content it was last scanned with.
- Flac
Importer - Mp3Importer
- OggImporter
- PngImporter
- Reimport
Report - Outcome of
reimport_project: importer results plus ref rewrites. - Scan
Report - Pure diff between the last manifest and the current file set. Every vector is sorted for stable, diffable output.
- Scanned
File - One importer-matched file found under the project root.
- UidRegistry
- WavImporter
Constants§
- MANIFEST_
FILE - Single manifest file at the project root.
Traits§
Functions§
- apply_
renames - Rewrite every
*.ptscn/*.pyfile underroot(same skip rules asscan_files) for each(old, new)rename. Only files with at least one quote-wrapped hit are written back. Returns the sortedres://-style paths of touched files. - default_
importers - load_
registry - Load the manifest; a missing file means an empty registry, not an error.
- reconcile
- Pure manifest-vs-files diff, no IO. Same path + same hash keeps the
uid; same path + new hash is
changed; a manifest path missing from disk but shadowed by an unclaimed file with equal (hash, size) is arename(uid travels); otherwiseremoved/added(fresh uid). - reimport_
project - Scan, re-run the matching importer over every
changed/addedpath (one failure never aborts the rest), rewrite refs forrenamedpaths, save, and return the fresh registry plus the report. - replace_
res_ ref - Replace only quote-wrapped
res://refs ("res://old",'res://old') with the new ref. Bare, unquoted occurrences are left untouched. - save_
registry - Save the manifest with entries always sorted by path (diffable).
- scan_
files - Recursive walk of
root, skipping hidden files/dirs (any component starting with.),target/,dist/,.git/. Keeps only files whose lowercase extension matches adefault_importersentry. - scan_
project - Load + scan + reconcile + save in one step.