How to select objects that are using layer material

Hello is there a way to sellect geometry that are using or not using layer material? if not is it scriptable?

I want to sellect objects that are using object based material directly given to them by vray not their layers.

Thank you.

Maybe you can use SelMaterialName to find objects with a specific material name.
It pops up a list of materials defined in the file.

I can do that manually from vray asset editor smilar to rhino material panel but there are way too much material.

This helps: https://developer.rhino3d.com/api/rhinoscript/selection_methods/objectsbymaterialsource.htm

Create a new script with this:

_-runscript (
sub SelectObjectsWithLayerMaterial

Rhino.UnselectAllObjects ()
Rhino.ObjectsByMaterialSource (0) ,True

End sub
SelectObjectsWithLayerMaterial
)
1 Like

Thank you @maje90