select objects with no assigned material

Hallo, can anyone tell me please, howto select objects with no assigned material?
Thanx a lot

Depending on what you want to do I would consider this a prime candidate for a Python script.

well the reason is that en external renderer would not accept any faces without a material assigned and produce an error. Thus, I need to go through entire model and find which objects dont have material-kind of time consuming :slight_smile:

http://www.infoocean.info/avatar3.jpgwell the reason is that en external renderer would not accept any faces without a material assigned and produce an error.

So basically you even could have a material assigned to each object, but somewhere missed some faces when UV mapping and still get an error?

no, i might have mislead you, its that it wont export when an object as a whole does not have a material, and my problem is that in complicated scenes when there is a lot of objects, and some of them dont have material assigned its hell finding them out…

a script could look like this:


import bpy

for obj in bpy.context.scene.objects:
    try: sel = len(obj.data.materials) == 0
    except: sel = False
    obj.select = sel

thank you Liero! This is so great a help to me:)
Is there really no way you can do this GUIway?
Or do I really need to learn python? THis solution seems so straightforward that I probably will! :slight_smile:
Thanx again

Have you tried Ctrl I after that you have selected all objects with assignet materials ?

Which brings me to the point how to select all objects with any material assigned?? :wink:

There is a material tool addon for blender iirc, it’s included but not activated by default. I think it’s called Material Utils.
When you press Q in the viewport you get a few options concerning materials.
Not sure if you can select anything w/o mats though.

Why not. It is reverse selection. It selects also the cameras and lamps though, but it´s not a problem i think.

http://www.infoocean.info/avatar3.jpgwell the reason is that en external renderer would not accept any faces without a material assigned and produce an error.