#!/usr/bin/env python3 import pathlib import sys import bpy def main(output: pathlib.Path) -> None: bpy.ops.wm.read_factory_settings(use_empty=True) light = bpy.data.lights.new("WebGapLight", type="AREA") light.color = (0.25, 0.5, 0.75) light.energy = 400.0 light.exposure = 1.0 light.temperature = 5000.0 light.use_temperature = True light.use_shadow = False light.shadow_soft_size = 0.3 light.shape = "RECTANGLE" light.size = 3.0 light.size_y = 2.0 light.spread = 2.4 light_object = bpy.data.objects.new("WebGapLightObject", light) bpy.context.collection.objects.link(light_object) bpy.ops.wm.save_as_mainfile(filepath=str(output.resolve()), check_existing=False, compress=True) if __name__ == "__main__": arguments = sys.argv[sys.argv.index("--") + 1 :] if len(arguments) != 1: raise SystemExit("usage: blender -b --python M16-GAP-00012.py -- OUTPUT") main(pathlib.Path(arguments[0]))