Skip to content

Instantly share code, notes, and snippets.

@zeffii
Created December 4, 2015 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/a144bb42ee5b4f9bed96 to your computer and use it in GitHub Desktop.
Save zeffii/a144bb42ee5b4f9bed96 to your computer and use it in GitHub Desktop.
import bpy
def add_curve(location):
bpy.ops.curve.primitive_bezier_curve_add()
obj = bpy.context.object
obj.location = location
return obj
obj1 = add_curve((0,0,0))
obj2 = add_curve((0,1,3))
obj3 = add_curve((0,0,6))
# In case this code is run after a bunch of other code we want to
# ensure the state of the scene
# :: deselect everything. no active either.
bpy.ops.object.select_all(action='DESELECT')
obj1.select = True
obj2.select = True
obj3.select = True
bpy.ops.object.join('INVOKE_DEFAULT')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment