In Blender, following this post, I notice that hovering over the Bevel Object
dialogue box in the object properties for my curve object, I see the helpful python data for my circleObj object:
Python: Curve.bevel_object
bpy.data.curves[circleObj].bevel_object
- What is the first reference to - I cannot see Curve object referenced in the API
- When I search the Blender 2.76 API Wiki (or as far back as the site pages went before they redirect to a different blender page), for bpy.data.curves, there returns nothing.
I want to use python to create thin pipework for my vectors, and I'm not turning up any programmatic methods equivalent to the blender SE post referenced above. Anyone done this? I've tried this:
tor0refCirc = vecCircle("tor0refCirc", 6, 1, "NOTHING", 1000.0, 1000.0, 1000.0, 0.0, 0.0, 0.0, 19)
for circleName, circleObj in sorted(cAr.items()):
circleObj.select = True
bpy.ops.object.convert(target='CURVE', keep_original=False)
bpy.data.curves[circleObj].bevel_object = tor0refCirc
bpy.ops.object.mode_set(mode='EDIT', toggle=True)
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles()
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
where vecCircle is a function that just calls bpy.ops.mesh.primitive_circle_add
to place a circle well out of the way of my scene to act as the diameter reference for my bevel.
bpy.ops.mesh.select_all(action='SELECT')
doesn't work on a curve object either, becauseops.mesh
. My advice to you is to remove some operations in the loop until you understand how they work on their own. And write your scripts using a .blend with only placeholder shapes to experiment with. $\endgroup$