extends SceneTree ## Operator-Nachweis (t_50a07d4b-Korrektur): Welche Textur bekommt der Live-Pfad? ## Erwartung: Palette 1024² fuer military_base, 2048² fuer picture_*. ## Lauf: /opt/data/home/bin/godot4 --headless --path . -s res://tests/probe_pack_tex_live.gd const GlbMeshStore := preload("res://core/viewport/glb_mesh_store.gd") func _initialize() -> void: var faelle := [ ["barrier_001", "military_base -> Palette 1024"], ["wall_001", "military_base -> Palette 1024"], ["apc_002", "picture_* -> Multicam 2048"], ["tent_001", "gemischt"], ] var fehler: Array = [] for f in faelle: var oid: String = f[0] var mesh: Mesh = GlbMeshStore.mesh_fuer(oid) if mesh == null: print(" %-12s KEIN MESH (uebersprungen)" % oid) continue print(" %s (%s) Flaechen: %d" % [oid, f[1], mesh.get_surface_count()]) for s in mesh.get_surface_count(): var mat := mesh.surface_get_material(s) var name := "-" var groesse := "keine Textur" if mat is BaseMaterial3D: name = String((mat as BaseMaterial3D).resource_name) var t := (mat as BaseMaterial3D).albedo_texture if t != null: groesse = "%dx%d" % [t.get_width(), t.get_height()] print(" Flaeche %d: Material='%s' Textur=%s" % [s, name, groesse]) if groesse == "keine Textur": fehler.append("%s Flaeche %d ohne Textur" % [oid, s]) elif name.begins_with("picture") and not groesse.begins_with("2048"): fehler.append("%s: picture-Material hat %s statt 2048er" % [oid, groesse]) elif name.begins_with("military_base") and not groesse.begins_with("1024"): fehler.append("%s: military_base hat %s statt 1024er" % [oid, groesse]) print("") if fehler.is_empty(): print("PROBE_PACK_TEX_LIVE_OK") else: for x in fehler: print(" FEHLER: %s" % x) print("PROBE_PACK_TEX_LIVE_FAIL") quit()