Technically simple thing, how can I check for exact crease weight edges and then select only them? Like only that one edge on the cube ?
2 Answers
AFAIK There isn't a command for this, but here is a simple script which selects all Edge Creases with values above 0.5
:
import bpy
obj = bpy.context.object
me = obj.data
bpy.ops.object.mode_set(mode='OBJECT')
for e in me.edges:
if e.crease > 0.5:
e.select = True
print (e.crease)
bpy.ops.object.mode_set(mode='EDIT')
Bmesh module solution (avoids toggling into Object Mode):
import bpy
import bmesh
obj = bpy.context.object
me = obj.data
bm = bmesh.from_edit_mesh(me)
cr = bm.edges.layers.crease.verify()
me.show_edge_crease = True
for e in bm.edges:
if (e[cr] > 0.5):
e.select = True
print(e[cr])
bmesh.update_edit_mesh(me, False, False)
- Select a creased edge.
- Shift+G> Select Similar
- Crease.
It will add to the selection other edges with similar crease value. (Similar means 0.01 tolerance)
You can view and edit the selected crease value from the properties panel (toggled with N) on the Transform group.