Govern task context and advance execution pointer
This commit is contained in:
18
tools/web/generated/M16-GAP-00037.py
Normal file
18
tools/web/generated/M16-GAP-00037.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
import pathlib, sys
|
||||
import bpy
|
||||
|
||||
def main(output: pathlib.Path) -> None:
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
mesh = bpy.data.meshes.new("WebGapCollisionMesh")
|
||||
mesh.from_pydata([(-1,-1,0),(1,-1,0),(1,1,0),(-1,1,0)], [], [(0,1,2,3)]); mesh.update()
|
||||
obj = bpy.data.objects.new("WebGapCollisionObject", mesh); bpy.context.collection.objects.link(obj)
|
||||
m = obj.modifiers.new(name="WebGapCollision", type="COLLISION")
|
||||
m.show_viewport = True; m.show_render = True; m.show_in_editmode = False; m.show_on_cage = False
|
||||
bpy.context.view_layer.objects.active = obj; obj.select_set(True)
|
||||
bpy.ops.wm.save_as_mainfile(filepath=str(output.resolve()), check_existing=False, compress=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
args=sys.argv[sys.argv.index("--")+1:]
|
||||
if len(args)!=1: raise SystemExit("usage: blender -b --python M16-GAP-00037.py -- OUTPUT")
|
||||
main(pathlib.Path(args[0]))
|
||||
Reference in New Issue
Block a user