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.

barigazy

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"?

barigazy

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)

barigazy

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?

barigazy

Comment viewing options

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