Hey
I was wondering if there was a way to remove a mesh from an object (composed of multiple meshes), without messing with the vertex order/ID of the other meshes
Hey
I was wondering if there was a way to remove a mesh from an object (composed of multiple meshes), without messing with the vertex order/ID of the other meshes
Hello and welcome to BlenderArtists.
If you’d prefer, you can also use a small Python script that you run to delete all mesh pieces that are in a certain vertex group as well.
This script will select any desired vertex group, then while in edit-mode, select and delete all vertices in that particular vertex group.
import bpy
# VARIABLES
OBJ = bpy.data.objects["Cube"]
VERTEX_GROUP_INDEX = 1
bpy.ops.object.mode_set(mode="OBJECT")
bpy.ops.object.select_all(action="DESELECT")
OBJ.select_set(True)
bpy.ops.object.mode_set(mode="EDIT")
bpy.ops.mesh.select_all(action="DESELECT")
OBJ.vertex_groups.active_index = VERTEX_GROUP_INDEX
bpy.ops.object.vertex_group_select()
bpy.ops.mesh.delete(type="VERT")
bpy.ops.object.mode_set(mode="OBJECT")
bpy.ops.object.select_all(action="DESELECT")