I have seen that a Python script can update several materials, that contain basically the same nodes, with simple value changes (Change multiple specific nodes in multiple materials (with python?))
I need to do something like this to affect over 2400 almost identical materials.
I have used a map globe downloaded from 3d Warehouse. This globe is black and white, and has been created by the designer using over 2400 jpegs of map squares and identical materials with unique jpeg names in the initial Base Colour node (see picture below).
The Material names are GLOBE_0 through to GLOBE_2448. If a node group had been used with the unique jpeg as input, I could change the node group to affect all. However, that was not the case.
I want to change the colour from black and white to gold and cream. I believe this update of the image could be created as a node group, with an input/output of Color, and slotted in between the Base Colour and Principled BSDF nodes. Although I am still a Blender novice, I will work out what this node group should contain (probably nick similar transformations in Blender STackExchange if I'm honest!). However, I don't know how the slotting in of a new node group would be scripted in Python.
The commonalities in all these materials are:
- Material names - GLOBE_0 through to GLOBE_2448
- A new node group - call it ColorGold
- Link between Base Colour and Principled BSDF nodes