10

Menu command File > External Data > Report Missing Files gives output such as:

Warning: Path '/foo/sometexture.jpg' not found

How do I discover which materials use that texture?

Or, is there a way to get a list of materials that have missing textures?

Update: I'm specifically interested in Cycles materials.

Samuli Pahaoja
  • 335
  • 1
  • 3
  • 14

2 Answers2

4

For blender internal materials that is easy. Enter the image name into the find field in the outliner header. Matches will be highlighted in green with material and objects easily visible for each.

enter image description here

For node based materials it is a bit more complicated. While the information can be found within the Datablocks view of the Outliner it is fairly well buried and not practical to find for a large project.

Currently the easiest way to search multiple cycles materials would be to use an addon called Online Material Library(cycles materials only - not blender internal node materials). This addon is currently still considered Beta. While not included with official release builds you should find it included with custom/svn builds from graphicall or can be downloaded from the above link and installed from the preferences addon panel.

Step 1 - activate the addon (or install from file and activate)

enter image description here

Step 2 - Show tools. This will now be available under materials properties.

enter image description here

Step 3 - Save All materials.

enter image description here

This saves all the cycles materials in the current blend file into the folder specified above the Save all materials button. The node information used for each material will be saved into it's own file. This leaves you with a folder full of text files that can easily be searched to find the image filename you are looking for.

While it doesn't appear to have been updated for a while blender-aid may also be another option.

sambler
  • 55,387
  • 3
  • 59
  • 192
  • 1
    The Online Material Library addon is very broken, and the Linux build on graphicall doesn't work on my Ubuntu 12.04. Nonetheless, this answer seems to explain the situation well, so I'm accepting it. Thanks. – Samuli Pahaoja Sep 26 '13 at 17:44
  • It is now in "Community" and no longer in "Testing" – Thomas Weller Sep 18 '17 at 11:00
  • Hi, with blender 2.8 it's impossible to found unlinked images in the outliner, and know what object or material need it. – softyoda yoann Jun 20 '20 at 18:09
0

You can try this, it will detect image texture missing and tell you the name of the material where it is in the console window. It only works at the node level, not inside groups

import bpy

print ("-Listing materials where the texture is missing----------------------------------------------")

missing_texture = "exact name of the missing texture without extension"

for mat in bpy.data.materials: try: nodes = mat.node_tree.nodes links = mat.node_tree.links

    for node in mat.node_tree.nodes:
        if node.name == "Image Texture":
            if missing_texture in node.image.name:                        
                print (">>",missing_texture,"present in material :",mat.name)

except:
    pass

cscholl
  • 153
  • 7