material.py 530 B

12345678910111213141516171819202122
  1. # Code licensed under the BSD License.
  2. # http://www.anki3d.org/LICENSE Panagiotis Christopoulos Charitos and contributors
  3. # keep methods in alphabetical order
  4. # blender imports
  5. import bpy
  6. bl_info = {"author": "A. A. Kalugin Jr."}
  7. def get_blender_images():
  8. """
  9. Gets the blender images using the materials
  10. """
  11. bl_images = []
  12. mats = bpy.data.materials
  13. for mat in mats:
  14. for slot in mat.texture_slots:
  15. if slot:
  16. if (slot.texture.image != None):
  17. bl_images.append(slot.texture.image.file_format)
  18. return bl_images