I want to convert a bunch of Empties into mesh vertices

Like the title said :smiley:
I have empties and want them to be vertices, how to do. Me fluffy too… :smiley:

Select your empties, open Blender’s text editor, create new text block, paste this and run script:

import bpy
import bmesh

def do_stuff(context, delete_empties = False):
    empties = [o for o in context.selected_objects if o.type == 'EMPTY']
    
    bm = bmesh.new()
    
    for e in empties:
        bm.verts.new(e.matrix_world.to_translation())
    
    mesh = bpy.data.meshes.new("pointsFromEmpties")
    bm.to_mesh(mesh)
    bm.free()
    obj = bpy.data.objects.new("pointsFromEmpties", mesh)
    context.scene.collection.objects.link(obj)
    
    bpy.ops.object.select_all(action = 'DESELECT')
    obj.select_set(True)
    context.view_layer.objects.active = obj
    
    if delete_empties:
        bpy.ops.object.delete({'selected_objects': empties})

# Change False to True if you want it to also delete the Empties
do_stuff(bpy.context, False)
2 Likes

Thank you a lot! Much love!
Me fluffy, to the moon and beyond!
:yum: :relaxed: