# VertexGroup(bpy_struct)

base class — `bpy_struct`

class `bpy.types.``VertexGroup`(bpy_struct)

  Group of vertices, used for armature deform and other purposes

  `index`

    Index number of the vertex group

    Type: | int in [0, inf], default 0, (readonly)

  `lock_weight`

    Maintain the relative weights for the group

    Type: | boolean, default False

  `name`

    Vertex group name

    Type: | string, default “”, (never None)

  `add`(index, weight, type)

    Add vertices to the group

    Parameters: | index (int array of 1 items in [-inf, inf]) – Index List weight (float in [0, 1]) – Vertex weight type (enum in [‘REPLACE’, ‘ADD’, ‘SUBTRACT’]) – Vertex assign mode `REPLACE` Replace, Replace. `ADD` Add, Add. `SUBTRACT` Subtract, Subtract.

  `remove`(index)

    Remove a vertex from the group

    Parameters: | index (int array of 1 items in [-inf, inf]) – Index List

  `weight`(index)

    Get a vertex weight from the group

    Parameters: | index (int in [0, inf]) – Index, The index of the vertex
    Returns: | Vertex weight
    Return type: | float in [0, 1]

Inherited Properties

`bpy_struct.id_data` |

Inherited Functions

`bpy_struct.as_pointer` `bpy_struct.driver_add` `bpy_struct.driver_remove` `bpy_struct.get` `bpy_struct.is_property_hidden` `bpy_struct.is_property_readonly` `bpy_struct.is_property_set` `bpy_struct.items` | `bpy_struct.keyframe_delete` `bpy_struct.keyframe_insert` `bpy_struct.keys` `bpy_struct.path_from_id` `bpy_struct.path_resolve` `bpy_struct.property_unset` `bpy_struct.type_recast` `bpy_struct.values`

References

`Object.vertex_groups` `VertexGroups.active` | `VertexGroups.new` `VertexGroups.remove`