Greetings,
I’m working on a script to export bezier curves into a csv file. The issue I’m having is the the bezier_points are in local space instead of world space. All the examples I’ve run across for converting to world space involve getting the matrix_world of the object. It does not appear that curves extend off of object and therefore do not have this matrix. So how would one go about transforming bezier_points into world space?
with open(basedir+"/test.csv",'w',newline='') as file:
writer = csv.writer(file,delimiter = ',')
count = 0
writer.writerow(["","x","y","z",
"i_x","i_y","i_z",
"o_x","o_y","o_z"])
for obj in bpy.data.curves:
for curve in obj.splines:
for bezpoint in curve.bezier_points:
count += 1
writer.writerow([count, bezpoint.co.x,bezpoint.co.y, bezpoint.co.z,
bezpoint.handle_left.x,bezpoint.handle_left.y,bezpoint.handle_left.z,
bezpoint.handle_right.x,bezpoint.handle_right.y,bezpoint.handle_right.z])