Govern task context and advance execution pointer
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

This commit is contained in:
mes123456
2026-08-20 06:02:43 -04:00
parent 380cbed4ff
commit 10640aeb3c
984 changed files with 543475 additions and 327 deletions

View File

@@ -0,0 +1,25 @@
#!/usr/bin/env python3
import sys
import bpy
def main(output):
bpy.ops.wm.read_factory_settings(use_empty=True)
curve = bpy.data.curves.new("WebGapCurve", type="CURVE")
curve.dimensions = "3D"
curve.resolution_u = 8
spline = curve.splines.new("BEZIER")
spline.bezier_points.add(2)
points = [((-1, 0, 0), (1, 1, 1)), ((0, 1, 0.5), (1, 1, 1)), ((1, 0, 1), (1, 1, 1))]
for point, (co, handle) in zip(spline.bezier_points, points):
point.co = co
point.handle_left_type = "AUTO"
point.handle_right_type = "AUTO"
spline.use_cyclic_u = False
object_ = bpy.data.objects.new("WebGapCurveObject", curve)
bpy.context.collection.objects.link(object_)
bpy.ops.wm.save_as_mainfile(filepath=output, compress=True)
if __name__ == "__main__":
args = sys.argv[sys.argv.index("--") + 1:]
if len(args) != 1: raise SystemExit("usage: blender -b --python generate-curve-fixture.py -- OUTPUT")
main(args[0])