How to find objects without UV

I have a scene with hundreds of objects and even if I started by unwrapping multiple objects groups at once and packed them in the same tiles, sometimes there are parts that I failed to select.
Is there a way to identify or select the objects left without UV?
Ideally I’d look for a filter in Outliner but I don’t see it. Blender 2.8

If you execute this it will select all mesh objects that don’t have UV data.

import bpy

bpy.ops.object.select_all(action='DESELECT')
mesh_objects = [o for o in bpy.context.scene.objects if o.type == 'MESH']
for o in mesh_objects:
    if not o.data.uv_textures:
        o.select = True

Thanks but I get “Python script fail, look in the console for now…”. There is nothing in Python console.

Forgot about 2.8 changes. This should work.

import bpy

bpy.ops.object.select_all(action='DESELECT')
mesh_objects = [o for o in bpy.context.scene.objects if o.type == 'MESH']
for o in mesh_objects:
    if not o.data.uv_layers:
        o.select_set(True)

btw, the error in console being referred to is the ‘System Console’ (under the window menu on windows, or terminal on linux).

Excellent! Thank you. I imagine that I can use this for all sorts of filtering, for example meshes with multiple material slots. Some day I need to dive into the Matrix :slight_smile:

Python is a very versatile language and it winds up driving a lot of products, not just Blender. (These days, with Django, it drives most of my web-sites, too.) Blender did a very clean implementation of bpy. Definitely worth looking into – very helpful even for small tasks like these.