Reputation: 33
I have a mesh in blender with one uv layer that is mapped to an image. From python I want to access the properties of that image (for example name, width and height).
I can get the uv layer like this:
ob = context.active_object
me = ob.data
uv_layer = me.uv_textures[0]
# does not work:
img = uv_layer.image
In blender 2.4x it was possible to do this: img = me.faces[0].image
How can I access the image object in Blender 2.5 ?
Upvotes: 0
Views: 1472
Reputation: 33
Ok, found out how to do it:
img = me.uv_textures[0].data.values()[0].image
Upvotes: 1