So I have no Idea what I am doing lol I have been experimenting with a little bit of code to try and select all objects in the scene if they have "x" amount of vertices. I have a scene with 158 objects in it. About 70 of those objects have 4 or less vertices but they are all mashed in with the other objects. Other than selecting each individual object one by one, I was hoping to be able to select all the objects that have 4 or less by simply clicking "Run Script" Is this code even remotely close? lol
import bpy
import bmesh
vertCount = 4
if True:
meshes = set(o.data for i in context.selected_objects
if o.type == 'MESH')
bm = bmesh.new()
for m in meshes:
bpy.ops.object.mode_set( mode = 'EDIT' )
bm = bmesh.from_edit_mesh( bpy.context.object.data )
if len(m.vertices) == vertCount
m.select = True
bpy.ops.object.mode_set( mode = 'OBJECT' )
bm.clear()
bm.free()
bm.Select_Flush(True)