Skip to content

Instantly share code, notes, and snippets.

@badjano
Created May 27, 2020 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badjano/23dae459bb601bd01e06026a8fce190c to your computer and use it in GitHub Desktop.
Save badjano/23dae459bb601bd01e06026a8fce190c to your computer and use it in GitHub Desktop.
import bpy
scene = bpy.context.scene
obs = set()
for ob in scene.objects:
for mod in ob.modifiers:
if mod.type == 'MIRROR':
obs.add(mod.mirror_object)
for ob in scene.objects:
if ob.type == 'EMPTY' and ob not in obs:
bpy.context.collection.objects.unlink(ob)
bpy.data.objects.remove(ob)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment