Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. import bpy
  2.  
  3. if bpy.context.active_object == None:
  4. print('Error: no object selected')
  5.  
  6. data = """
  7. 2 0 0
  8. -2 0 0
  9. 1.4 1.4 0
  10. 1.4 -1.4 0
  11. -1.4 1.4 0
  12. -1.4 -1.4 0
  13. 0 2 0
  14. 0 -2 0
  15. """
  16.  
  17. data = data.strip()
  18. lines = data.split('\n')
  19.  
  20. for line in lines:
  21. pos = [float(field) for field in line.split()]
  22. bpy.ops.object.duplicate()
  23. obj = bpy.context.active_object
  24. obj.location = pos
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement