Getting image assigned to UV set in 2.8

Hi guys,

is there currently a way to get what image is assigned to a particular UV set? Previously in 2.7 there was eg.[“Cube”].uv_textures[“UVMap”].data[0].image, but uv_textures is gone in 2.8.

Thank you in advance

It’s now uv_layers instead of uv_textures, but image is no longer a member of data[n]

At the risk of sounding like the Microsoft paperclip, it looks like you’re trying to get the texture assigned to one or more faces. If that’s that case, you can loop through the object’s polygons (or refer to a specific polygon) to get the material_index, which then allows you get the actual material ([index]). From there you can get the nodes and follow the incoming links to get the image texture.

Thanks @RSoul, I’ll have a look. :slight_smile: