Version: Blender 2.81
Using the Python API, I want to create a default path and then add individual points to it.
The code below does this. Except that it extends both the beginning and the end of the curve.
import bpy
# kill everything
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False, confirm=False)
# create curve
bpy.ops.curve.primitive_nurbs_path_add(radius=1, enter_editmode=False, location=(0, 0, 0))
# switch to edit mode
bpy.ops.object.editmode_toggle()
# add new point for curve
bpy.ops.curve.extrude_move(CURVE_OT_extrude={"mode":'TRANSLATION'},
TRANSFORM_OT_translate={"value":(0, 2, 0)}
)
In the viewpoint, I can extend the END of the curve by toggling edit mode, and then doing this: double-clicking the last point, and pressing E.
I can't figure out how to use python to select this last point.