Notifications
Clear all

[Closed] get object name by material

Can anyone tell me how to get object or objects name by material?
example:i have one material in my scene which is assigned to some objects,i want to get those objets name(as an array or something) through this material.
pls explain me how to do this.

thanks
-mani.

2 Replies

objnames = for o in objects where o.material == [B]mymat[/B] collect o.name

where mymat is the material you want to search for.

  • Martijn

thanks Martijn ,now my scriptworks well.