Python scripting
I would like to add a hook to an Nurbs Path while scripting
In Layout :
delete 'Cube' Add Curve -> Path change to Edit Mode select a Vertex ctrl+h
all set and done
Scripting:
# Add Path
coords_list = ([[0,0,0], [1,0,0]])
path = bpy.data.curves.new('_path', 'CURVE')
path.dimensions = "3D"
spline = path.splines.new(type='POLY')
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 weight)
Path = bpy.data.objects.new('_Path', path)
bpy.context.scene.collection.objects.link(Path)
Setting bpy.data.objects['_Path'].modifers["....ID...."].vertex_indices[0] is read only.
Trying to add vertex_groups to the Path just returns a 'None Type'
any Ideas ?
THX Martin