What I want is to print out in the console the Bezier control points which are accessible in Edit Mode.
I want to copy these values after it’s printed.
Example output:
Bezier curve positions:
1, X: -1.5, Y: -6.5, Z: 0
2, X: -1, Y: -6, Z: 0
etc.
import bpy
o = bpy.context.object
m = o.matrix_world
print("Object:", o.name)
for x0, i in enumerate(o.data.splines):
print("Spline:",x0)
for x1, j in enumerate(i.bezier_points):
print ("Point:",x1,([email protected]).to_tuple(2), "Right:",([email protected]_right).to_tuple(2), "Left:",([email protected]_left).to_tuple(2))
It will print all splines with points and handles :
Object: BezierCurve
Spline: 0
Point: 0 (10.52, 0.0, 0.0) Right: (11.02, 0.5, 0.0) Left: (10.02, -0.5, 0.0)
etc.