There is an operator to select sharp edges, and an operator to select edges marked as sharp if you have already an edge marked as sharp selected, but is there a way to select edges marked as sharp when you have nothing selected?

Maybe add a temporary edge, mark it as sharp, select similar, delete temporary edge? I don't know how to do that though.

I can see that bmesh.types.BMEdge has a seam attribute, but no sharp(?). So I guess it's not possible to loop through edges selecting the ones marked as sharp...


There isn't a single command for this, but a script to do this is quite simple:

Note that with BMesh, the same smooth option is used for faces and edges (not smooth == sharp).

import bpy
import bmesh

obj = bpy.context.edit_object
me = obj.data

bm = bmesh.from_edit_mesh(me)
for e in bm.edges:
    if not e.smooth:
        e.select = True

bmesh.update_edit_mesh(me, False)
| improve this answer | |
  • $\begingroup$ I like this because it doesn't seem to require the weird mode changing of my answer. $\endgroup$ – MrFlamey Nov 10 '15 at 15:39

You can use the 'use_edge_sharp' parameter of the Mesh type like this:

import bpy

def select_sharp_edges():
    me = bpy.context.object.data

    for e in me.edges:
        if e.use_edge_sharp:
            e.select = True



Oddly, this doesn't select the edges unless you are in object mode, which is quite annoying. I guess object.data changes depending on the current mode. You should also be able to easily get the edges by something like:

sharp_edges = [e for e in me.edges if e.use_edge_sharp]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.