← Commit history

fusion library: claim misplaced 3D models only when the bridge names another project; keep the build reply (#114 live run)

Colby Knox ·6e212f9ae8 · ·parent 077b62d
1 file changed +6−2
tools/fusion-project.py+6−2
@@ -830,8 +830,12 @@ def cmd_library(a):                 res = pr; break             if pr.get('stage'): say('  3D: %s' % pr.get('stage'))         if not res: err('the 3D build did not finish in time', ['Read fusion_prove_result; run `adom-aiflow fusion library` again: parts already bound are kept and only the rest are built.'])-        if (res.get('projectName') or r.get('projectName')) != project:-            models_home = 'The 3D models went to the project open in Fusion\'s data panel (Adom AI Workspace/%s there), not %s/%s: this Fusion bridge does not take a destination for them yet. Make %s the active project in the data panel before `fusion library` to keep them with the design.' % (name, project, folder, project)+        (STATE / 'library' / 'build3d.json').write_text(json.dumps({'start': r, 'result': res}, indent=1))+        # only a project the bridge names counts: its build result does not echo one (1.13.47 saved the+        # models in --project/--folder and said nothing, and this used to claim they went elsewhere)+        went = res.get('projectName') or r.get('projectName')+        if went and went != project:+            models_home = 'The 3D models went to %s, not %s/%s: this Fusion bridge does not take a destination for them. Update the Fusion bridge (1.12.0+ saves them in --project/--folder), or make %s the active project in the data panel before `fusion library`. The build\'s replies are in <run>/fusion/library/build3d.json.' % (went, project, folder, project)         back = {m.upper(): m for m in st['parts']}         for x in res.get('parts', []):             if x.get('success') and x.get('wip_urn'): st['parts'][back.get(x['package'].upper(), x['package'])]['urn'] = x['wip_urn']