Selection hard/soft edges

I want to select hard/soft edges by python api, but i can not do that.
Please help me. Thanks.

Do you mean the crease value, set by the bpy.ops.transform.edge_crease() call in which case you can do this:

obj = bpy.data.objects["Cube"]
edges_creased = [e for e in obj.data.edges if e.crease > 0]
# You could also set a specific value
edges_creased = [e for e in obj.data.edges if e.crease >= 0.5]

You can also check for Sharp and Seam:

obj = bpy.data.objects["Cube"]
edges_sharp = [e for e in obj.data.edges if e.use_edge_sharp]
edges_seam = [e for e in obj.data.edges if e.use_seam]

You can also set these values in code BTW.

Cheers, Clock.

1 Like

Thanks you @clockmender,but I mean the hard/soft edge as the picture below.