saumwacht-godot/tools/glass_review.gd
Martin Stickelbroeck c2b447610c Baseline: Saumwacht 0.15.0 (Phase 20A) vor dem Umbau zu Champions of Luneraria
Unveränderter Ausgangsstand inklusive Masterprompt und Konzeptbildern
unter assets/. .godot/ und docs/screenshots/ bleiben laut .gitignore
unversioniert; letztere sind unter ../backups gesichert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-27 20:00:36 +02:00

42 lines
2.1 KiB
GDScript

extends Node
## Capture Glasballiste review stills. Asserts the inspector shows g06 before each shot.
var main: Node3D
var captures := "res://docs/screenshots/phase19"
func _ready() -> void:
call_deferred("run")
func shot(name: String) -> void:
for n: int in range(8): await get_tree().process_frame
await RenderingServer.frame_post_draw
print("GLASS_SHOT: ", name, " id=", main.hud.model_inspector.model_id, " caption=", main.hud.model_inspector._caption.text, " details=", main.hud.model_inspector._details.text)
get_viewport().get_texture().get_image().save_png(captures + "/" + name + ".png")
func run() -> void:
get_window().size = Vector2i(1600, 1000)
Soundscape.enabled = false
WaveManager.set_physics_process(false)
main = preload("res://scenes/main.tscn").instantiate()
add_child(main)
main.hud.model_inspector.show_model("g06")
print("GLASS_MODEL: ", main.hud.model_inspector.model_id, " caption=", main.hud.model_inspector._caption.text, " path=", AssetLibrary._models.get("g06", {}).get("resource_path"), " tris=", AssetLibrary._models.get("g06", {}).get("triangles"))
if main.hud.model_inspector.model_id != "g06":
printerr("GLASS_REVIEW_FAIL: inspector shows ", main.hud.model_inspector.model_id, " instead of g06")
await Soundscape.quit_game(1)
return
var studio: Control = main.hud.model_inspector
studio._rotate = false
studio._clip_paused = true
# Three-quarter views show the long bolt and bow span, as in the concept.
studio._turntable.rotation.y = -.45
await shot("glass-front")
studio._turntable.rotation.y = PI - .45
await shot("glass-back")
studio._turntable.rotation.y = -.45
# Walk mid-stride, release just after contact, braced aim, full charge, collapsed.
var times: Dictionary = {"walk": .55, "attack_a": .95, "attack_b": .60, "ability": .80, "death": 2.0}
for clip: String in times:
for i: int in range(studio._clip_selector.item_count):
if studio._clip_selector.get_item_metadata(i) == clip:
studio._clip_selector.select(i)
studio._clip_time = times[clip]
await shot("pose-" + clip)
print("GLASS_REVIEW_PASS")
await Soundscape.quit_game()