As the title says, I want to be able to check a location for the existence of an object. I'm randomly filling a space with objects and want to make sure I'm not placing an object somewhere that is already occupied. Current code is:
for x in range(1000): loc = np.random.randint(-100, 100, 3) bpy.ops.mesh.primitive_cube_add(size=2, view_align=False, enter_editmode=False, location=(loc,loc,loc)) bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
I'd like to add something like,
if NOT location(loc,loc,loc): add object...
Existing questions seem to be about getting location of known objects. I need the reverse of that - getting an object (or not) at a known location.