Browse Source

Improve UV extraction

pull/6/head
Adam Johnson 11 years ago
parent
commit
9424311c65
  1. 7
      korman/exporter/mesh.py

7
korman/exporter/mesh.py

@ -152,11 +152,8 @@ class MeshConverter:
# Convert to per-material indices
for j in tessface.vertices:
# Unpack the UV coordinates from each UV Texture layer
uvws = []
for uvtex in mesh.tessface_uv_textures:
uv = getattr(uvtex.data[i], "uv{}".format(j+1))
# In Blender, UVs have no Z coordinate
uvws.append((uv.x, uv.y))
# NOTE: Blender has no third (W) coordinate
uvws = [(uvtex.data[j].uv.x, uvtex.data[j].uv.y) for uvtex in mesh.uv_layers]
# Grab VCols (TODO--defaulting to white for now)
# This will be finalized once the vertex color light code baking is in

Loading…
Cancel
Save