I want to process an asset library that contains four assets, one for each season per Blend file. I want to change the material properties for all objects in the Blend file based on the material name.
I have four objects in the scene, which have a suffix per season:
Now I want to change the material properties based on the season and the material itself, the name of which is the text after the last underscore (e.g. "trunk" or "rock").
Ideally, I want to input a list that contains the materials that should be processed, e.g. (leaf_flowers, leaf). Then, I need to change these properties in the main nodegroup:
As you can see, input 2 corresponds to the AUTUMN property, input 3 to WINTER and input [4] to SPRING.
The changes are as follows: If the asset contains "_summer", skip it. Summer assets have all 3 properties set by 0 as default. If the asset contains "_autumn" set input 2 to value 1. If the asset contains "_winter" set input 3 to value 1. If the asset contains "_spring" set input [4] to value 1.
Note that a typical material looks something like this:
So it has one node group and this nodegroup is the one that should be affected.