HI there,
I am trying to make a little Script/Addon, that has a button in the N Panel,
and creates a vertexgroup from selected Vertices, and then renames it…
It looks a little like that…
class Assign2Vertexgroup(bpy.types.Operator):
bl_label = "Assign2Vertexgroup"
bl_idname = "assign.2_vertexgroup"
def execute(self, context):
#######################################################################
bpy.ops.object.vertex_group_assign_new()
bpy.context.active_object.vertex_groups.active.name = "Align"
bpy.ops.object.mode_set(mode='EDIT')
return {'FINISHED'}
#######################################################################
It works, but now I had the idea to not hardcode the “ALIGN” into that script, but to have a promptline in the panel were the user can predefine a name, that then is used for the renaming step…
is this possible in Blender/Python?