Get all materials with 'wood' in the material name

I’m trying to create a script that finds all materials in the project containing a specific word in the material name. For example, find all materials with ‘wood’ in the name. The full material name might be something like 'DarkWood_1".

My goal is to then change the ‘Class’ value for these materials.

I have a script that gathers all materials in a project, I’d just like to go one step further and filter by
contained word. is this possible? thanks!

@EYRC Have a look here for how to set “Class”

Cheers KS

1 Like

& you can filter By element Name similar to below

2 Likes

Thanks, @Kai! filtering by name worked!

One more issue I’m having is using the Genius Loci ‘Material Set Class’ - I have no errors but after running the script the ‘Class’ value doesn’t change.

here is a script for the Material Set Class which works, except it collects materials by view rather than name

@EYRC set your lacing to longest in the “Material Set Class” node than you should be good to go.