An Issue with Bezier Curve Creation

Hi all,

I have been playing around with ThomasL’s awesome 2.5 Code Snippets pdf and specifically the curve creation part. Everything was going swimmingly until I changed the handle type on some Bezier curve points. Here’s the code I used:

import bpy

from mathutils import Vector

# Add curve and object.
aCurve ='aCurve','CURVE')
aObj ='aObj',aCurve)

# Set attributes
aCurve.dimensions = '3D'
aCurve.use_fill_back = False
aCurve.use_fill_front = False

# Set the control coordinates
points = [(0,0,0),(2,2,-2),(3,-1,5)]

spline ='BEZIER')
spline.bezier_points.add(numPoints-1) # Make sure only numPoints points in the curve, 1 is created with the new Bezier.

for n in range(numPoints):
    newPoint = spline.bezier_points[n] # New point = points[n] # Set the coordinates

    newPoint.handle_left =,0,1)) # Set the handles above and below the points
    newPoint.handle_right =,0,-1))
    newPoint.handle_right_type='AUTO' # Set the handle type

It is clear if you enter edit mode that the handles are not behaving as AUTO handles should. To demonstrate what they should look like, select a point in edit mode, press ‘G’ and then ‘ESC’ and they will fix themselves.

Does anyone know why this happens? Why don’t the handles behave properly to begin with? Does someone know a way to force them to update?

Thank in advance,

It’s a bug, reported with a fix.

Fantastic, thanks for the quick help.