return index
@staticmethod
- def getTexture(material, index):
- return material.texture_slots[index].texture
+ def getTexture(m, index):
+ return m.texture_slots[index].texture
@staticmethod
- def hasTexture(material):
- return material.texture_slots[0]
+ def hasTexture(m):
+ return m.texture_slots[0]
@staticmethod
- def setUseTexture(material, index, enable):
- material.use_textures[index]=enable
+ def setUseTexture(m, index, enable):
+ m.use_textures[index]=enable
@staticmethod
def eachTexturePath(m):
continue
yield image.filename
+ @staticmethod
+ def eachEnalbeTexturePath(m):
+ for i, slot in enumerate(m.texture_slots):
+ if m.use_textures[i] and slot and slot.texture:
+ texture=slot.texture
+ if texture.type=="IMAGE":
+ image=texture.image
+ if not image:
+ continue
+ yield image.filename
+
class mesh:
@staticmethod
class vertex:
@staticmethod
- def setNormal(mvert, normal):
- mvert.normal=mathutils.Vector(normal)
+ def setNormal(v, normal):
+ v.normal=mathutils.Vector(normal)
+
+ @staticmethod
+ def getNormal(v):
+ return v.normal
@staticmethod
- def setUv(mvert, uv):
+ def setUv(v, uv):
+ # sticky ?
pass