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

Loading…
Cancel
Save