I want to create a curve between two given points. But I don't know how to add the points to the curve object. When you create a new mesh data block, you have the from_pydata() function to add verts, but I can't find an equivalent for the cruve data block. This is my code so far (just creating a new cruve data block and a curve object, then linking it to the collection)
def createCurve():
star_point = [0,0,0]
end_point = [1,0,0]
curve = bpy.data.curves.new(name='curve_data',type='CURVE')
curveObj = theObj = bpy.data.objects.new("curve_obj", curve)
bpy.context.collection.objects.link(curveObj)
Can someone help me?
Thanks in advance