I made a small addon for how I block out for sculpting & I want a button to add a NURBS path aligned to the z axis with filled caps and a bevel of O.25. This gets the path, but no bevel:
class MakeTube(bpy.types.Operator):
bl_idname = "object.make_tube"
bl_label = "Make Tube"
def execute(self, context):
bpy.ops.curve.primitive_nurbs_path_add(radius=1, enter_editmode=False, align='WORLD', location=(0, 0, 1), rotation=(0, 1.5708, 0), scale=(1, 1, 1))
bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
bpy.data.curves["NurbsPath"].bevel_depth = 0.25
bpy.data.curves["NurbsPath"].bevel_resolution = 4
bpy.data.curves["NurbsPath"].use_fill_caps = True
return {'FINISHED'}
What am I missing? Thanks!