Is there a way to search though the materials in a Blender project and replace the texture names?

For example, I have a PBR material consisting of several different external textures and I want to change the names of the textures while leaving the shader nodes intact. Rather than clicking on each texture node and loading a new texture, I'm hoping there's a way to search and replace the texture names. Seems to me this should be possible; is it? Thanks. Blender 3.0, Windows 11

  • $\begingroup$ There is no built-in to do this, but you could easily adapt this answer to do the image replacement when it finds an image node. $\endgroup$ Commented Jan 21, 2022 at 17:48
  • $\begingroup$ Marty Fouts, thank you for the suggestion. I'm not a scripting expert so I'll need to do some research to see if this will meet my needs. Thanks again! $\endgroup$
    – WilburPost
    Commented Jan 21, 2022 at 17:58
  • $\begingroup$ You need to make a list of pairs of images, with the old name in the new. In the if statement where I print the image name, you need to replace the print with code to do the change. You can find a sample of that code in other answers here. $\endgroup$ Commented Jan 21, 2022 at 18:06


You must log in to answer this question.

Browse other questions tagged .