applied patch from Boris van Schooten, [#8148] Animation bugfix for md2_export script
[blender-staging.git] / release / scripts / md2_import.py
index e39b2ca85ec58069d7e70eb22ffae0c95fe408f9..ec778c1e1b8ec88a34e8051f6e4b238040c32a6e 100644 (file)
@@ -448,6 +448,8 @@ def load_md2(md2_filename, texture_filename):
        
        w = float(md2.skin_width)
        h = float(md2.skin_height)
+       if w <= 0.0: w = 1.0
+       if h <= 0.0: h = 1.0
        #for some reason quake2 texture maps are upside down, flip that
        uv_list = [Vector(co.u/w, 1-(co.v/h)) for co in md2.tex_coords]
        del w, h