lceda_step: fall back to using footprint 3D model UUID directly when component lookup fails

This commit is contained in:
2026-08-12 10:27:38 +08:00
parent 55feb4c41f
commit 6de2b4a057
+5 -5
View File
@@ -130,14 +130,14 @@ def main():
print(" {}: {}".format(code, e)) print(" {}: {}".format(code, e))
for uuid in uuids: for uuid in uuids:
name, model, owner = uuid, uuid, ""
try: try:
comp = get_component(uuid, args.cookie) comp = get_component(uuid, args.cookie)
name = comp.get("display_title") or comp.get("title") or uuid
model = comp.get("3d_model_uuid")
owner = comp.get("path", "")
except Exception as e: except Exception as e:
print("{}: {}".format(uuid, e)) print("{}: component lookup failed ({}), trying uuid as model uuid".format(uuid, e))
continue
name = comp.get("display_title") or comp.get("title") or uuid
model = comp.get("3d_model_uuid")
owner = comp.get("path", "")
print("{} | {} | model={} | owner={}".format(uuid, name, model, owner)) print("{} | {} | model={} | owner={}".format(uuid, name, model, owner))
if not model: if not model:
print(" no 3D model available") print(" no 3D model available")