I can’t get the Curve module to create bezier curves by giving it BezTriple objects. I’m assuming a BezTriple is a list of 3 lists, each sublist defining the x,y,z coords of a point, as the getTriple function returns for an existing curve object.
I’m using Blender 2.40.
Has anyone succeeded in creating Bezier curves from a python script?
In 2.37 appending a BezTriple resulted in a seg fault. I was told this is fixed in 2.40 and yes, it doesn’t crash, but still I keep getting the error:
TypeError: expected a sequence of 4 or 5 floats
Any help appreciated.
UPDATE: found the answer myself. One has to pass Blender.BezTriple objects to the appendNurb and the appendPoint functions of the Blender.Curve module. AND the BezTriple.New() accepts a tuple, not a list, so one has to do (NOTE the double brackets):
bt = BezTriple.New((1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9,0))