When I execute the below code I get output:

Code: Select all

```
LayerAmount = []
LayerCurrentNr = []
for index in range(len(Mesh.vertices)):
LayerAmount.append(0)
LayerCurrentNr.append(0)
for uvlayer in Mesh.uv_layers:
if uvlayer.data[index].pin_uv == True:
LayerAmount[index] += 1
print("Layer uv amount for vertex ", index, " is equal to ", LayerAmount[index])
```

Layer uv amount for vertex 0 is equal to 1

Layer uv amount for vertex 1 is equal to 1

Layer uv amount for vertex 2 is equal to 1

Layer uv amount for vertex 3 is equal to 1

Layer uv amount for vertex 4 is equal to 1

Layer uv amount for vertex 5 is equal to 1

Layer uv amount for vertex 6 is equal to 1

Layer uv amount for vertex 7 is equal to 1

And I don't understand why there is such strange output.

If vertex 'N' is located and pinned in x uv maps, then I should get:

Layer uv amount for vertex N is equal to X

So I completely don't understand the horrible logic which creators of blender implemented. I am implementing directx exporter and how can I get to know in which ub map layers 'mesh.polygons.vertices' instance occurs???