Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- if bpy.context.active_object == None:
- print('Error: no object selected')
- data = """
- 2 0 0
- -2 0 0
- 1.4 1.4 0
- 1.4 -1.4 0
- -1.4 1.4 0
- -1.4 -1.4 0
- 0 2 0
- 0 -2 0
- """
- data = data.strip()
- lines = data.split('\n')
- for line in lines:
- pos = [float(field) for field in line.split()]
- bpy.ops.object.duplicate()
- obj = bpy.context.active_object
- obj.location = pos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement