Fix the messed up UVs.

I had forgotten to invert the t axis.
This commit is contained in:
Bill Currie 2011-09-23 19:58:26 +09:00
parent a80eef8bc4
commit a1d9e752cd

View file

@ -114,8 +114,10 @@ def build_tris(mesh):
def convert_stverts(mdl, stverts):
for i, st in enumerate (stverts):
s, t = st
# quake textures are top to bottom, but blender images
# are bottom to top
s = int (s * mdl.skinwidth + 0.5)
t = int (t * mdl.skinheight + 0.5)
t = int ((1 - t) * mdl.skinheight + 0.5)
# ensure st is within the skin
s = ((s % mdl.skinwidth) + mdl.skinwidth) % mdl.skinwidth
t = ((t % mdl.skinheight) + mdl.skinheight) % mdl.skinheight