Select objects that have no material assigned

Is there a script to select all objects in a scene that don't have a material applied yet?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
3DV's picture

isKindof means: 'is a bit

isKindof means: 'is a bit like'

Mostly used when you can't decide to which category something belongs.

barigazy's picture

But it is very useful

But it is very useful function for filtering some objects class,
especially for PickButon ctrl.

bga

3DV's picture

Nice one, thanks! On a

Nice one, thanks!

On a sidenote, considering coding: isKindof is hilarious!

barigazy's picture

I don't understand what is

I don't understand what is hilarious in "isKindof"?

bga

barigazy's picture

Simplified version

Or you can use simplified version

select (for geo in geometry where not isKindof geo TargetObject and isKindOf geo.material UndefinedClass collect geo)

bga

barigazy's picture

Obj with no material

It easy task.Try this code

select (for obj in objects where isKindof obj GeometryClass and not isKindof obj TargetObject and obj.material == undefined collect obj)

Are you need rollout dialog for this?

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.