Govern task context and advance execution pointer
This commit is contained in:
34
tools/web/generated/M16-GAP-00015.py
Normal file
34
tools/web/generated/M16-GAP-00015.py
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/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)
|
||||
data = bpy.data.metaballs.new("WebGapMetaBall")
|
||||
data.resolution = 0.2
|
||||
data.render_resolution = 0.1
|
||||
first = data.elements.new()
|
||||
first.co = (-0.65, 0.0, 0.4)
|
||||
first.radius = 0.75
|
||||
first.size_x = 1.1
|
||||
first.size_y = 0.9
|
||||
first.size_z = 1.2
|
||||
second = data.elements.new()
|
||||
second.co = (0.65, 0.0, 0.4)
|
||||
second.radius = 0.55
|
||||
second.size_x = 0.8
|
||||
second.size_y = 1.05
|
||||
second.size_z = 0.95
|
||||
obj = bpy.data.objects.new("WebGapMetaBallObject", data)
|
||||
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-00015.py -- OUTPUT")
|
||||
main(pathlib.Path(arguments[0]))
|
||||
Reference in New Issue
Block a user