feat: FTP-Spiegel fuer externe 3D-Assets

- --publish laedt Workbench-Dateien per FTPS hoch und verifiziert sie
  durch Rueckdownload und SHA-256
- --sync laedt fehlende Assets vom Server, wenn die Workbench fehlt
- Manifest um remote-Pfad ergaenzt, Manifest-Test auf 53 Assertions
- Doku, Architektur (D13) und Roadmap aktualisiert
This commit is contained in:
torsten 2026-10-31 12:39:30 +01:00
parent 8861cbae92
commit 697274ce1b
7 changed files with 494 additions and 104 deletions

View file

@ -9,6 +9,7 @@
"format": "glb",
"source": "library/characters/skater_figure_rigged_deform_v002.glb",
"target": "assets/external/characters/skater_figure_rigged_deform_v002.glb",
"remote": "characters/skater_figure_rigged_deform_v002.glb",
"sha256": "1c1f06461b58b02d9b8332a756fdc88f533ff2d25f65a59d21ca0209b65128cb",
"bytes": 8345424,
"source_scene": "source/characters/skater/skater_rig_v002.blend",

View file

@ -49,11 +49,12 @@ func _run() -> void:
var seen_ids := {}
var seen_targets := {}
var seen_remotes := {}
for entry: Variant in asset_list:
_check(entry is Dictionary, "asset entry is an object")
if not entry is Dictionary:
continue
_validate_asset(entry, seen_ids, seen_targets)
_validate_asset(entry, seen_ids, seen_targets, seen_remotes)
_finish()
@ -61,7 +62,8 @@ func _run() -> void:
func _validate_asset(
asset: Dictionary,
seen_ids: Dictionary,
seen_targets: Dictionary
seen_targets: Dictionary,
seen_remotes: Dictionary
) -> void:
for key: String in [
"id",
@ -70,6 +72,7 @@ func _validate_asset(
"format",
"source",
"target",
"remote",
"sha256",
"bytes",
"placement",
@ -110,6 +113,19 @@ func _validate_asset(
)
seen_targets[target] = true
var remote := str(asset.get("remote", ""))
_check(not remote.is_empty(), "asset '%s' has a remote path" % asset_id)
_check(_is_relative_path(remote), "asset '%s' remote path is relative" % asset_id)
_check(
not remote.contains(".."),
"asset '%s' remote path has no '..'" % asset_id
)
_check(
not seen_remotes.has(remote),
"asset '%s' remote path is unique" % asset_id
)
seen_remotes[remote] = true
var sha256 := str(asset.get("sha256", ""))
_check(sha256.length() == 64, "asset '%s' has a SHA-256 length" % asset_id)
_check(_is_hex(sha256), "asset '%s' has a hexadecimal SHA-256" % asset_id)