Materials information on a file Blender Internal Render I'm trying to get information from a Blend File, but I've just hit a wall.

We are referring to Blender Internal Render. Not Cycles Render.

I'm new to Blender basically, so I really don't have a clue of neither scripting or Python whatsoever, so I really don't have a clue of what do I have access or what can or can't do via Python scripts on Blender, so I was thinking: Is it possible to take the material information from a Blend file or from within Blender, specifically, what files they are using?



In this example, thanks to Blender, I know the files the Metal material is using are these, but is there a way to output, let's say:

Metal:
- nomad_a1_diff.tga
- nomad_a1_norm.tga
- enviroment.png

And this, with all materials? Thank you in advance!

EDIT

What I'm basically trying to get is this


Name of any materials of a mesh.
Listing the textures of that single material.


Example

Material: Metal Textures of the Material Metal: nomad_a1_diff.tga, nomad_a1_norm.tga, enviroment.png 

These three are the materials for that Metal material on the image.

I want to do this with every material on the model. Thanks to this script, I've got the name of all the materials, however, instead of listing all the textures per material, it lists all the textures of the model, I don't need that.

UPDATE

Thanks to atomicbezierslinger for the script, he helped me to get a step on the right direction!

I've run your script, but it gives me just the name of the textures. I've done some research and found a function called bpy.data.materials so I decided to add it to the script and now it looks like this

import bpy
import datetime

def inspect_textures():
    for t in bpy.data.materials:
        print(t.name)
        for t in bpy.data.textures:
            if isinstance(t, bpy.types.ImageTexture) and hasattr(t,'image'):
                x = t.image
                if hasattr(x,'filepath'):
                    print(t.name, type(t),t.image.filepath)                       
        else:
             print(t.name, type(t), "?")



inspect_textures()




This is the output from the code above. Now it gives the name of the material and the name of all the textures of the model, when all what I need is the texture names of the specific materials,  is there something else it can be done or does it need another import? Thanks so far for the help!
A Text Editor window containing a Python Script.  Filename indicated has the suffix [.py].  Line numbers and Syntax Coloring enabled. Yellow arrows from left to right show, Window Type, Name of file, Buttons for line numbers and syntax coloring, Button to Run Script.  Image Above.

Only copy the newest software code sample.  The images above have older software.  But they address questions that may apply to you which are not letter by letter code specific.

NEWER

import bpy
import datetime

print("-" * 88)
print(datetime.datetime.now())
print("-" * 88)

def inspect_m_textures(simple_sleek):
    print(bpy.types.ImageTexture, " Preferred")
    for m in bpy.data.materials:
        #print("M ", m.name)
        b = False;
        for ts in m.texture_slots:
            if hasattr(ts, 'name'):
                b = True
                continue
        if b:
            print("M ", m.name)
            inspect_t_textures(simple_sleek, m.texture_slots)


def inspect_t_textures(simple_sleek, slots):
    #print(bpy.types.ImageTexture, " Preferred")
    n = 0
    fs = "%03d" # format string
    #for t in bpy.data.textures:
    for ts in slots:
        #print(t.name)
        #print(type(t))
        #n += 1
        if not hasattr(ts, 'name'):
            continue
        t = ts.texture
        if isinstance(t, bpy.types.ImageTexture) and hasattr(t,'image'):
            n += 1
            ns = fs % (n,)
            if hasattr(t,'image'):
                x = t.image
                if hasattr(x,'filepath'):
                    print(ns, t.name, t.image.name,t.image.filepath)
                else:
                    print(ns, t.name, "Incomplete", "Incomplete")
            else:
                print(ns, t.name, "No Image")
        elif not simple_sleek:
            n += 1
            ns = fs % (n,)
            print(ns, t.name, type(t), "Other No Match")



inspect_m_textures(True)    


OLDER

import bpy
import datetime

print("-" * 88)
    print(datetime.datetime.now())
print("-" * 88)

def inspect_textures():
    for t in bpy.data.textures:
        print(t.name)
        #print(type(t))
        if isinstance(t, bpy.types.ImageTexture) and hasattr(t,'image'):
            x = t.image
            if hasattr(x,'filepath'):
                print(t.name, type(t),t.image.filepath)
        else:
             print(t.name, type(t), "?")



inspect_textures()    


Python for Cut and Paste.  Code Block Above.  Inspect, Verify and Improve. You can delete comments and extra print statements and extra print arguments.

Open or use text editor window. New Text. Name Textures.py  . Copy and paste the text above.  Make sure the formatting is retained.  Execute from Button or Keystroke indicated on Tooltip of Button. The console window has the textual results. Toggle the visibility of the Console Window from the menu.  In the [Info] window Menu/Window/Toggle System Console



Console Window on Windows 10.  Console allows Copy and Paste.  Python allows Standard Out Redirection.  Image Above.



Toggle the System Console. Image above.