Select doubles?

Hello everyone!
Is there a way to select doubles in Blender?
Sometimes when working on video game assets, I accidentally create doubles I don’t want to be there without noticing.
The thing is that when I remove doubles in the complete mesh, there may be further errors following that I would have to clean up. But as I don’t know where the vertices were removed, I would have to take a close look at each face of the entire mesh which would be pretty much insane.
Any ideas?

Many thanks in advance,

depending, you might be able to locate some by going to the select menu, and choosing ‘non-manifold’. this at least will show you the ones that occurred when merging two mirrored halves of a mesh for instance. also, you can adjust the threshold of the remove doubles function.

Thank you very much for your reply, Modron!
Unfortunately, when selecting “non-manifold”, Blender will show me many vertices that are supposed to be like that.
Also, “Remove Doubles” will always remove doubles that are supposed to stay, too.
Adjusting the threshold won’t help there, I guess.
(Most of the time, I place vertices very exactly.
Sometimes there will be a .00001 or something gap for some odd reason.
This happens when duplicating and snapping all the time.)

Here’s a script, but it performs poorly on complex meshes - 3k vertices is okay however.

import bpy
import bmesh
from mathutils.kdtree import KDTree

def main(ob, threshold, extend):

    bm = bmesh.from_edit_mesh(
    verts = bm.verts
    if not extend:
    me =

    size = len(me.vertices)
    kd = KDTree(size)

    kd_insert = kd.insert
    for i, v in enumerate(me.vertices):
        kd_insert(, i)

    for v in me.vertices:
        for vec, index, dist in kd.find_range(, threshold):
            if index != v.index:
                verts[index].select = True

class SimpleOperator(bpy.types.Operator):
    bl_idname = "mesh.select_doubles"
    bl_label = "Select Doubles"
    bl_options = {'REGISTER', 'UNDO'}

    threshold = bpy.props.FloatProperty(
        name="Select Distance",
        description="Minimum distance between vertices to select",
    extend = bpy.props.BoolProperty(
        description="Extend the selection",

    def poll(cls, context):
        return (context.object is not None and
                context.object.type == 'MESH' and

    def execute(self, context):
        main(context.object, self.threshold, self.extend)
        return {'FINISHED'}

def register():

def unregister():

if __name__ == "__main__":

Hi, on simple objects I try to narrow down view. way 1) in 3D View properities panel (N) in View tab try to manipulate Start / End of Clip. way 2) use Clipping Border Alt+B. Next select doubles with B, C or CTRL+drag with LMB

Thank you for your replies, CoDEmanX and PiotrPL!

Did you write that script?
I haven’t tried it yet, but I guess it won’t work for me at the moment because my mesh is made
of about 80k vertices which I want to split up into different parts after finishing the environment completely.
This would probably work nicely if I run into doubles when working on smaller parts, though!

I just tried using the script, but there was an error showing up:

location: <unknown location>:-1

SyntaxError: invalid character in identifier
bm = bmesh.from_edit_mesh(
File “/Text”, line 7
Python script fail, look in the console for now…

I’m not sure if the script doesn’t work, if it doesn’t work with Blender 2.69 (which I am using) or if this is an error produced by me.
I’m not familiar with Python and I have barely used any scripts in Blender at all.
I just copied your script into the Text Editor and pressed “Run Script”.

I guess this won’t help right now because I am working on a pretty large scene.
But it’s good to know that routine! Maybe it will help at some point when there are doubles on simple objects.

Script works for me.

Tried on Blender 2.70a, Linux 64-bit.

Did you write that script?

Yes, and it works for me, maybe some bad character sneaked in or indentation got messed up when you copied it?

To make it as fast as remove doubles, it would need to be written in C, like remove doubles.

I just copy & pasted the code from a quote of your post.
I deleted the

 and [quote]s. And it doesn't seem to work at all.
I tried this on my 2.70a version and I even downloaded Blender 2.70a again (from just to make sure.
But all I get is the exact same error as I already quoted.
Maybe this problem is caused by some modification of the settings in Blender?
Or maybe it's some addon I use that could be making troubles?
I'm rather confused right now.

I tried it again and this time there was an anomaly. If the script is run while in edit mode and then try it, doesn’t do its thing. Have to jump back to object mode and back and then it works. Maybe that got in the way.

Did you get the same error that I got?
I just tried it about 10 times, jumping back and forth from Edit- to Objectmode, but it didn’t help.
The same error keeps showing up. That’s confusing.

No, definitely not.

Well yes, that’s exactly what I do. Unless I’m missing some small detail.
Now I also tried to copy the text directly from your “Code:”.
What’s even weirder is that, when trying to use the code from “Code:”, there will be a different error than the one that occurs when using the code from a quote of your “Code:”.
So I guess the problem comes with the process of copying?

Here is a screenshot of trying to use the code from a quotation:

and this is what it looks like when I copied the code directly from “Code:”:

Thanks & working.

I just tried one more thing: I copied the text directly from your “Code:” and tried using it in Blender 2.70a.
It worked. It was the same copy I tried using in Blender 2.69 and it didn’t work there.
So I guess it’s not compatible with 2.69 and copying from the quote doesn’t work either
(or maybe I did some mistake when testing it in Blender 2.70a the first times).
Hopefully, Blender 2.71 will be a “good” release. I just can’t work with 2.70a.