Created
June 9, 2019 07:25
-
-
Save sambler/c751aa76e7007669008aae0abd48350c to your computer and use it in GitHub Desktop.
Suggested variation of script in BSE answer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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