Blender 2.8 Curves with Bevel

Hi guys, I added a new feature to my free Fast Carve addon so that you can add beveled curves now with 2 clicks which are aligned to the hit objects in the viewport - have fun.

1 Like

Thanks for this tutorial!

I have notice that you are really good at coding. I want to do a tiny script to close a curve. How would I go about to do it.

  1. user select a ‘curve’ in object mode
  2. run the script it will ‘Auto Close the Curve’
    . I want to select both end point of the ‘selected curve’ is it possible to select it without manually
    select the end points?

import bpy
bpy.ops.object.editmode_toggle()

(this is the step I am missing) (I can do a select all, but how would you just want to select both end points only)

bpy.ops.curve.handle_type_set(type=‘VECTOR’)
bpy.ops.curve.make_segment()

Please see images below

Hi,
to set it to cyclic can be done like this

context.object.data.splines[0].use_cyclic_u = True

But I think that’s not what you want. You want to connect the start and end point, right?

I think selecting is something like this

curve = context.object.data.splines[0]

bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.curve.select_all(action='DESELECT')

# check the API here, perhaps it is something like select_set(True)
curve.points[0].select = True  

# and the last something like this
curve.points[-1].select = True

Thank you for your quick respond. I will test it out.