I want to get a position and handle the type of specific spline
as you know there are some types
for example, I want to get point 1 type and position
position = Vector(2.0, 0.0, 0.0)
type = 'ALIGNED'
based on bezier spline point documentation and this useful blog
you can get the position of handle by handle_left
and handle_right
Handl positions handle_left handle_right
you can get handle type by handle_left_type
and handle_right_type
Handle types
enum in [‘FREE’, ‘VECTOR’, ‘ALIGNED’, ‘AUTO’], default ‘FREE’
so you can get them easily
import bpy
# Type of the first handle
print(bpy.data.curves['BezierCurve'].splines[0].bezier_points[0].handle_left_type)
# Type of the second handle
print(bpy.data.curves['BezierCurve'].splines[0].bezier_points[0].handle_right_type)
# Coordinates of the first handle
print(bpy.data.curves['BezierCurve'].splines[0].bezier_points[0].handle_left)
# Coordinates of the second handle
print(bpy.data.curves['BezierCurve'].splines[0].bezier_points[0].handle_right)
D.curves['BezierCurve'].splines[0].bezier_points[0].handle_right
will echo result back to console.
$\endgroup$
Commented
Aug 23, 2020 at 6:45