Files
workinf_Blender_Wasm/tools/web/generated/M16-GAP-00264.py
mes123456 5c8cfd1a8c
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
Complete M16 asset operator parity chain
2026-08-23 18:10:00 -04:00

28 lines
738 B
Python

#!/usr/bin/env python3
import pathlib
import sys
import bpy
IMAGE_NAME = "WebGapAssetDownloadImage"
IMAGE_PATH = "//assets/WebGapAssetDownload.png"
def main():
arguments = sys.argv[sys.argv.index("--") + 1 :]
if len(arguments) != 1:
raise SystemExit("usage: blender -b --factory-startup --python M16-GAP-00264.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()