I have a script that selects some random faces and splits them. I would like to add the selection to a vertex group. I can't get my script to assign the selection to a vertex group. Thank you for the help.
sub2 = 0 bpy.ops.mesh.select_all(action='SELECT') bpy.ops.mesh.select_random(percent=55, seed=10, action='DESELECT') bpy.ops.mesh.split() group = context.object.vertex_groups.new() group.name = ("Island" + str(sub2)) #group.add(bpy.data.objects.data.verts, 1.0, 'ADD') bpy.ops.object.vertex_group_assign()