I have been looking for a way to do this for a long time (
mark_seam (True\False) and
mark_sharp (True\False)) with one button in my pie menu.
I managed to achieve some kind of result. I found how to do one button bevel and crease.
How to determine if the seam is on only selected edges?
import bpy import bmesh obj = bpy.context.object me = obj.data bm = bmesh.from_edit_mesh(me) bw = bm.edges.layers.bevel_weight.verify() cr = bm.edges.layers.crease.verify() #se = bm.edges.layers.seam.verify() ??? selected = [e for e in bm.edges if e.select] if any(e[bw] == True for e in selected): bpy.ops.transform.edge_bevelweight(value=-1) else: bpy.ops.transform.edge_bevelweight(value=1) bmesh.update_edit_mesh(me, True)