#!/usr/bin/env python3 import pathlib import sys import bpy IMAGE_NAME = "WebGapAssetsDownloadImage" IMAGE_PATH = "//assets/WebGapAssetsDownload.png" def main(): arguments = sys.argv[sys.argv.index("--") + 1 :] if len(arguments) != 1: raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00265.py -- OUTPUT") bpy.ops.wm.read_factory_settings(use_empty=True) image = bpy.data.images.new(IMAGE_NAME, width=1, height=1, alpha=True) image.filepath = IMAGE_PATH image.source = "FILE" image.use_fake_user = True bpy.ops.wm.save_as_mainfile( filepath=str(pathlib.Path(arguments[0]).resolve()), check_existing=False, compress=True ) if __name__ == "__main__": main()