"""Mako: build in a fresh headless Blender (nothing saved) and render the sheet-matched views and quick looks, to iterate on the shape: blender.exe -b --factory-startup --python build/run_look.py [-- wire] [-- noviews]""" import bpy, os, sys, traceback HERE = r"D:\HADAL - The Descent\models\tender-mako\build" for o in list(bpy.data.objects): bpy.data.objects.remove(o) try: g = {"__name__": "mako"} exec(open(os.path.join(HERE, "build_mako.py")).read(), g) rep = g["REPORT"] print("REPORT", {k: rep.get(k) for k in ("hull_stations", "boundary_loops", "pruned_faces", "dimensions", "bounds_min", "bounds_max")}) if "noviews" not in sys.argv: exec(open(os.path.join(HERE, "mk_views.py")).read(), {"__name__": "views"}) exec(open(os.path.join(HERE, "mk_preview.py")).read(), {"__name__": "pv", "WIRE": "wire" in sys.argv, "NAME": "wire" if "wire" in sys.argv else "wb"}) print("LOOK OK") except Exception: traceback.print_exc() print("LOOK FAILED")