2
$\begingroup$

When I use this code in Blender I get what I want. When I run from the command line the result is not beveled like I expect

import bpy

def clear():
    bpy.ops.object.select_all()
    bpy.ops.object.delete()

def deleteAll():
    for x in bpy.data.objects:
        x.select=True
        bpy.ops.object.delete()

clear()
deleteAll()
bpy.ops.curve.primitive_bezier_circle_add(radius=2,location=(0,0,0),rotation=(0,1,0))
wiresize = bpy.context.object
print (type(wiresize))
wiresize.name="Size"    
bpy.ops.curve.primitive_nurbs_path_add(radius=1,location=(0,0,0),rotation=(1,0,0))
wire = bpy.context.object
print (type(wire))
bpy.context.object.data.bevel_object = wiresize
bpy.context.scene.objects.unlink(wire)
wire.name ="test"
bpy.ops.wm.save_as_mainfile(filepath="C:/Users/in805/OneDrive/Documents/GitHub/pyBlender/test.blend")
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.