# HG changeset patch # User Thibaut Girka # Date 1312287979 -7200 # Node ID 668b808b73efb15055f1867668e240d8e5958b52 # Parent f3ff9619247671e1e581bb25246838b96d69f9ed Fix texture coords handling diff --git a/stageviewer.py b/stageviewer.py --- a/stageviewer.py +++ b/stageviewer.py @@ -109,10 +109,10 @@ def build_objects_faces(stage, anim): transform = Matrix.get_translation_matrix(x, y, z).mult(transform) vertmat = transform.mult(vertmat) - uvs = [(tx / 256., 1. - (ty / 256.)), - ((tx + tw) / 256., 1. - (ty / 256.)), - ((tx + tw) / 256., 1. - ((ty + th) / 256.)), - (tx / 256., 1. - ((ty + th) / 256.))] + uvs = [(tx / anim.size[0], 1. - (ty / anim.size[1])), + ((tx + tw) / anim.size[0], 1. - (ty / anim.size[1])), + ((tx + tw) / anim.size[0], 1. - ((ty + th) / anim.size[1])), + (tx / anim.size[0], 1. - ((ty + th) / anim.size[1]))] for i in xrange(4): w = vertmat.data[3][i]