How to get a list of UV coordinates

You may need to get a list of coordinates of the mesh’s UV, for example, when exporting a mesh from Blender’s internal format to any external formats.

A list of the mesh UV-s can be got by accessing the “uv_layers” structure:

The current (active) UV is accessed through the “active” element:

Now we can get the coordinates of the points of the active mesh UV from the “data” structure with the following command:

The “data” structure is a list of “loops” of the “MeshUVLoop” type. Each “loop” contains UV point coordinates.

0 0 votes
Article Rating
Notify of

0 Comment
Inline Feedbacks
View all comments