"""Headless rebuild of the geometry in Tender_Spearfish.blend (when the open Blender is not there): build, refresh the rig's drivers, save. The surfaces pass must run after it (a rebuild replaces the meshes and their UVs).""" import bpy, os HERE = r"D:\HADAL - The Descent\models\tender-spearfish\build" exec(open(os.path.join(HERE, "build_spearfish.py")).read(), {"__name__": "sf"}) bpy.ops.wm.save_mainfile() print("HEADLESS BUILD SAVED", bpy.data.filepath)