return material.texture_slots[0]
@staticmethod
- def getTexturePath(m, dirname):
- tex=""
- aplane=""
- # texture
+ def eachTexturePath(m):
for slot in m.texture_slots:
if slot and slot.texture:
texture=slot.texture
image=texture.image
if not image:
continue
- imagePath=image.filename
- if len(dirname)>0 and imagePath.startswith(dirname):
- # \e$BAjBP%Q%9$KJQ49$9$k\e(B
- imagePath=imagePath[len(dirname)+1:len(imagePath)]
- #imagePath=Blender.sys.expandpath(
- # imagePath).replace("\\", '/')
- if slot.map_colordiff:
- tex=" tex(\"%s\")" % imagePath
- elif slot.map_alpha:
- aplane=" aplane(\"%s\")" % imagePath
- return tex, aplane
-
+ yield image.filename
class mesh:
@staticmethod