How do I change the Bevel Weight of the selected vertex using Python? I need to find the selected vertex, maybe as a list? and then change its bevel weight.
You have to be in Object Mode to set the Bevel Weight via Python. In the following example I set all vertices of my Default Cube or
bpy.context.object to have
bevel_weight = 0.77 and then override the vertex at index 0 to have a
bevel_weight = 0.44.
import bpy bpy.ops.object.mode_set(mode='OBJECT') obj = bpy.context.object vertices = obj.data.vertices # change bevel weight for every vertex for v in vertices: v.bevel_weight = 0.77 # change bevel weight for selected vertex selected_verts = [v for v in vertices if v.select] for v in selected_verts: v.bevel_weight = 0.55 vertices.bevel_weight = 0.44 # change bevel weight for vertex at index 0