Guest User

Untitled

a guest
Jan 17th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import bpy
  2.  
  3. from bpy import context
  4. scene = context.scene
  5.  
  6. TOL = 0.1 # get all objects within 0.1 bu of loc
  7. #use cursor for location
  8. loc = scene.cursor_location
  9.  
  10. obs_in_location = [o for o in scene.objects
  11. if (o.matrix_world.translation - loc).length < TOL]
  12.  
  13. print(len(obs_in_location), " at ", loc)
  14. if len(obs_in_location):
  15. for o in obs_in_location:
  16. print("t", o.name)
Add Comment
Please, Sign In to add comment