Skip to main content
added 125 characters in body
Source Link
Martynas Žiemys
  • 28.1k
  • 2
  • 38
  • 81

I think one loop is enough for this:

import bpy 
from mathutils import Vector

location = Vector((0,0,0)) # this should be some location

for o in bpy.context.scene.objects: 
    if o.location == location:
        bpy.data.objects.remove(o) 

Obviously all kinds of conditions related to the location could be checked, but those should be another questions.

I think keeping in mind that floating point binary conversion errors do exist is a good idea in this context as well.

I think one loop is enough for this:

import bpy 
from mathutils import Vector

location = Vector((0,0,0)) # this should be some location

for o in bpy.context.scene.objects: 
    if o.location == location:
        bpy.data.objects.remove(o) 

Obviously all kinds of conditions related to the location could be checked, but those should be another questions.

I think one loop is enough for this:

import bpy 
from mathutils import Vector

location = Vector((0,0,0)) # this should be some location

for o in bpy.context.scene.objects: 
    if o.location == location:
        bpy.data.objects.remove(o) 

Obviously all kinds of conditions related to the location could be checked, but those should be another questions.

I think keeping in mind that floating point binary conversion errors do exist is a good idea in this context as well.

Source Link
Martynas Žiemys
  • 28.1k
  • 2
  • 38
  • 81

I think one loop is enough for this:

import bpy 
from mathutils import Vector

location = Vector((0,0,0)) # this should be some location

for o in bpy.context.scene.objects: 
    if o.location == location:
        bpy.data.objects.remove(o) 

Obviously all kinds of conditions related to the location could be checked, but those should be another questions.