I have a bezier curve in 3D space, made of several points. I want to be able to delete the segment that goes from (let's say) point 12 to point 13, so that now my curve has a gap where it was previously connected. With the interface this is easy: go to Edit mode, select by hand the points, hit x and select Segment, et voila!. BUT I want to be able to do this programmatically from a python script (using the blender api).

I guess the part I'm stuck with is actually selecting the points programmatically, I've been browsing the docs but as a newbie I was not able to find an answer.

I would be very grateful for all your help.

Thanks in advance!


1 Answer 1


I was having the same problem when I realised that you can use the curve operators. So, you can do something like the following:

c = bpy.data.objects["foo"]
bpy.context.view_layer.objects.active = c
c.data.splines[0].bezier_points[2].select_control_point = True

The curve operators also allow you to delete, rather than dissolve points.

See: Blender curve operators


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .