From 6c5bebd80b81f9e9a4cfd8b8ac3aeee2bc3150ad Mon Sep 17 00:00:00 2001 From: Miloslav Ciz Date: Sun, 1 Aug 2021 14:13:16 -0500 Subject: [PATCH] Fix python tool --- tools/obj2array.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/obj2array.py b/tools/obj2array.py index c2abe11..0ce9995 100644 --- a/tools/obj2array.py +++ b/tools/obj2array.py @@ -99,7 +99,10 @@ for line in objFile: for i in indices: components = i.split("/") t.append(int(components[0]) - 1) - u.append(int(components[1]) - 1) + try: + u.append(int(components[1]) - 1) + except Exception as e: + u.append(int(components[2]) - 1) triangles.append(t) triangleUVs.append(u)