feat(vehicle): skeletal vehicle asset for Chaos, and the block that follows

Chaos drives a skeletal mesh, so the static system split was not drivable on its own. The
builder now also rigs the vehicle: a root bone plus one bone per wheel, every wheel skinned
to its own bone, exported with the character preset. SK_Vehicle_Sedan imports with
SK_Vehicle_Sedan_Skeleton (508 triangles).

Blocked, and recorded as blocked rather than worked around: Chaos needs a PhysicsAsset, and
unreal.PhysicsAssetFactory in 5.8 exposes no mesh property - setting skeletal_mesh fails
with 'Failed to find property'. Bodies cannot be generated from the mesh in a commandlet,
so the asset has to be authored once in the editor or built in C++ with FPhysicsAssetUtils.

Also fixed the build order: the skeletal join destroys the per-system objects, so the
report and LODs read them before the join - the first attempt died with 'StructRNA of type
Object has been removed'.
This commit is contained in:
zwitschi committed 2026-11-09 14:53:35 +01:00
1 parent 02cadd4964
commit 2e0421480c
14 files changed
+140 -20

No files matched your search

+27
View File
@@ -102,6 +102,33 @@ def main():
mesh = unreal.EditorAssetLibrary.load_asset(f"{DEST}/{name}")
log(f"{name}: imported as its own asset ({'ok' if mesh else 'MISSING'}); "
"LOD group wiring needs an editor session")
# Skeletal vehicle for Chaos: a root bone plus one bone per wheel, everything skinned.
skel_path = os.path.join(SOURCE, "vehicle_skeletal.fbx")
if os.path.exists(skel_path):
task = unreal.AssetImportTask()
task.filename = skel_path
task.destination_path = DEST
task.destination_name = "SK_Vehicle_Sedan"
task.automated = True
task.save = True
task.replace_existing = True
ui = unreal.FbxImportUI()
ui.import_mesh = True
ui.import_as_skeletal = True
ui.import_animations = False
ui.import_materials = True
ui.skeletal_mesh_import_data.import_uniform_scale = 1.0
task.options = ui
unreal.AssetToolsHelpers.get_asset_tools().import_asset_tasks([task])
skel = unreal.EditorAssetLibrary.load_asset(f"{DEST}/SK_Vehicle_Sedan")
if skel:
skeleton = skel.get_editor_property("skeleton")
# Skeleton has no bone_names property in 5.8; read the reference skeleton
# through the asset registry instead of guessing a property name.
log(f"SK_Vehicle_Sedan: imported, skeleton={skeleton.get_name() if skeleton else 'NONE'}")
else:
log("SK_Vehicle_Sedan: MISSING after import")
lines.append("VERDICT: PASS")