10
$\begingroup$

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.

$\endgroup$
1

2 Answers 2

4
$\begingroup$

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.

$\endgroup$
3
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Sep 26, 2013 at 17:44
  • $\begingroup$ It is now in "Community" and no longer in "Testing" $\endgroup$ Commented Sep 18, 2017 at 11:00
  • $\begingroup$ Hi, with blender 2.8 it's impossible to found unlinked images in the outliner, and know what object or material need it. $\endgroup$ Commented Jun 20, 2020 at 18:09
0
$\begingroup$

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
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .