1
$\begingroup$

When packing external data into a blend file, it comes up with errors saying that several images are missing. I have tracked down some of the images to materials which came with purchased models (and then deleted them from the material since the files don't exist, and are not that important) but after going through almost every material in the blend file, I still get an error on packing with some images still not being found. Is there any way to find out where these rogue files are being referenced from. Looking at similar questions I see some people recommend a materials manager add on which seems to put all images into single directory, but I can't see how that would help me find the materials that are referencing non-existing image files. Just so annoying that I can't search for the images within the ouliner, and then see their parent material. Hopefully I'm missing something obvious.

$\endgroup$
3
  • $\begingroup$ Hi :). Simply go File > External Data > Report missing files. You can see all the missing files listed in the console (Window > Toggle System Console) $\endgroup$ Commented May 28, 2021 at 14:11
  • 2
    $\begingroup$ Hi Jachym, Thanks for responding, but it doesn't answer the question. Doing as you suggest tells me the pathname of some non-existant files, and at that point there is nothing more i can do to fix the problem other than create some dummy images at those locations to get rid of the error. My question is how do if find where in the blend file these rogue images are referenced so that I can remove/modify those references. $\endgroup$ Commented May 28, 2021 at 15:16
  • 2
    $\begingroup$ OK... It seems like it is impossible to find where an image is referenced from. Should be really simple - Blender recognised and reports the error but not where it found it! crazy, $\endgroup$ Commented Jun 10, 2021 at 13:16

2 Answers 2

0
$\begingroup$

It could be more efficient, but here's a crude script that lists all objects that have materials with image textures, and the image filepath (if it has one) of each image texture.

import bpy def find_nodes_by_type(material, node_type): node_list = [] if material.use_nodes and material.node_tree: for n in material.node_tree.nodes: if n.type == node_type: node_list.append(n) return node_list material_set = set() for object in bpy.context.scene.objects: for material in object.material_slots: image_nodes = find_nodes_by_type(material.material, "TEX_IMAGE") if len(image_nodes): material_set.add(material) for object in bpy.context.scene.objects: for material in object.material_slots: if material in material_set: print(f"Object {object.name}, uses material {material.name}") image_nodes = find_nodes_by_type(material.material, "TEX_IMAGE") for image_node in image_nodes: if image_node.image: print(f"\timage {image_node.image.name} has file '{image_node.image.filepath}'") else: print("\tEmpty image texture") 
$\endgroup$
0
$\begingroup$

In my project, I don't believe anything was referencing these "missing file" files, but the fact that they existed in the Blender File view caused the "missing file" error every time I saved. I ended up fixing it by doing the following.

  • Press the Display Mode dropdown in the Outliner: enter image description here
  • Choose Blender File
  • Under Images, right click the offending "missing file" images and hit Delete
$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.