From 521f482806c2d0d3b019535fba2a0733b9e6c468 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 25 Sep 2011 20:52:28 +0900 Subject: [PATCH] Fix an off-by-one error that caused uvs to wrap. --- tools/io_mesh_qfmdl/export_mdl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/io_mesh_qfmdl/export_mdl.py b/tools/io_mesh_qfmdl/export_mdl.py index 1938aea25..deda8707a 100644 --- a/tools/io_mesh_qfmdl/export_mdl.py +++ b/tools/io_mesh_qfmdl/export_mdl.py @@ -121,8 +121,8 @@ def convert_stverts(mdl, 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 ((1 - t) * mdl.skinheight + 0.5) + s = int (s * (mdl.skinwidth - 1) + 0.5) + t = int ((1 - t) * (mdl.skinheight - 1) + 0.5) # ensure st is within the skin s = ((s % mdl.skinwidth) + mdl.skinwidth) % mdl.skinwidth t = ((t % mdl.skinheight) + mdl.skinheight) % mdl.skinheight