Skip to content

Instantly share code, notes, and snippets.

@sambler
Created June 9, 2019 07:25
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 sambler/c751aa76e7007669008aae0abd48350c to your computer and use it in GitHub Desktop.
Save sambler/c751aa76e7007669008aae0abd48350c to your computer and use it in GitHub Desktop.
Suggested variation of script in BSE answer
# script variation for https://blender.stackexchange.com/a/142495/935
import bpy
skull = bpy.data.objects["Skull"]
curve = bpy.data.objects["xobject_name"]
if 'Skulls' not in bpy.data.collections:
newCol = bpy.data.collections.new('Skulls')
bpy.context.scene.collection.children.link(newCol)
skull_Col = bpy.data.collections['Skulls']
for index, point in enumerate(curve.data.splines[0].points):
if (index % 2 == 0):
new_skull = skull.copy()
new_skull.data = skull.data
skull_Col.objects.link(new_skull)
new_skull.location = point.co[:-1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment