I'm using the following script to create path curve:
def create_curve(coords_list):
crv = bpy.data.curves.new('crv', 'CURVE')
crv.dimensions = '3D'
spline = crv.splines.new(type='NURBS')
spline.points.add(len(coords_list) - 1)
for p, new_co in zip(spline.points, coords_list):
p.co = (new_co + [1.0]) # (add nurbs
obj = bpy.data.objects.new('object_name', crv)
bpy.data.scenes[0].collection.objects.link(obj)
coords_list
generated using another script.
here are the first coordinates in coords_list
:
coords_list[0] = [0,0,1]
coords_list[1] = [1.079576297914498, 0.12957629791449818, 1]
coords_list[2] = [1.796242964581165, -0.5870903687521685, 1]
But if you look at the layout tab it looks like the first and second coordinates were not included in the path curve for some reason.
What am I doing wrong? How can I print all the points ensamble the path curve?