Govern task context and advance execution pointer
This commit is contained in:
26
tools/web/generated/M16-GAP-00017.py
Normal file
26
tools/web/generated/M16-GAP-00017.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/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)
|
||||
obj = bpy.data.objects.new("WebGapObject", None)
|
||||
obj.location = (1.25, -2.5, 3.75)
|
||||
obj.rotation_mode = "XYZ"
|
||||
obj.rotation_euler = (0.2, -0.35, 0.5)
|
||||
obj.scale = (1.5, 0.75, 2.0)
|
||||
obj.hide_viewport = False
|
||||
obj.hide_render = False
|
||||
obj.hide_set(False)
|
||||
bpy.context.collection.objects.link(obj)
|
||||
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-00017.py -- OUTPUT")
|
||||
main(pathlib.Path(arguments[0]))
|
||||
Reference in New Issue
Block a user