I'm trying to write a script which creates a Nurbs path curve, bevels it, and then stores the location of each vertex/point in that curve. I've been writing it based on the code displayed in the info panel, but it doesn't show what the vertices are supposed to be called - so I can't refer to them in the script.
Update: After following Ratt's links, I modified ThomasL's code for Nurbs Path and am now stuck again, though it's still progress. Below is one version I tried out, but the error message says that Curve has no attribute path_points. Of course it doesn't, because I made that up because I don't know what the Nurbs Path equivalent for bezier_points is.
import bpy
import random
def pathPointLoc(cu, typ, points):
for (n) in enumerate(points):
nurb = cu.path_points[n]
print(nurb.location)
return
cu = bpy.data.curves.new("MyCurve", "CURVE")
ob = bpy.data.objects.new("MyCurveObject", cu)
scn = bpy.context.scene
scn.objects.link(ob)
scn.objects.active = ob
cu.bevel_object = bpy.data.objects["BezierCircle"]
cu.taper_object = bpy.data.objects["BezierCircle"]
pathPointLoc(cu, "NURBS", [(0,0,0,1), (0,0,1,random.randint(1,4)), (0,1,1,1), (1,4,1,1)] )