Complete M16 asset operator parity chain
This commit is contained in:
27
tools/web/generated/M16-GAP-00264.py
Normal file
27
tools/web/generated/M16-GAP-00264.py
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/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()
|
||||
Reference in New Issue
Block a user