mat/lamp/world.textures -> texture_slots

object.materials -> material_slots

since neither contain textures or materials directly.
This commit is contained in:
Campbell Barton
2010-02-07 12:51:47 +00:00
parent 3238730e36
commit bb571c67cb
7 changed files with 12 additions and 12 deletions

View File

@@ -134,7 +134,7 @@ def write_mtl(scene, filename, copy_images):
# file.write('map_Kd %s\n' % img.filename.split('\\')[-1].split('/')[-1]) # Diffuse mapping image
elif mat: # No face image. if we havea material search for MTex image.
for mtex in mat.textures:
for mtex in mat.texture_slots:
if mtex and mtex.texture.type == 'IMAGE':
try:
filename = copy_image(mtex.texture.image)
@@ -176,7 +176,7 @@ def copy_images(dest_dir):
# Get MTex images
if mat:
for mtex in mat.textures:
for mtex in mat.texture_slots:
if mtex and mtex.texture.type == 'IMAGE':
image_tex = mtex.texture.image
if image_tex: