From 9b36175ba6ec10f7284adcf54dfab252873bd295 Mon Sep 17 00:00:00 2001 From: Irmitya <10817631+Irmitya@users.noreply.github.com> Date: Sat, 21 Nov 2020 22:26:38 -0600 Subject: [PATCH] Fix: don't try to load blank texture files When a .ascii lists # textures but leave it blank, the addon treat those blank spaces as the "file's" name. Later when creating the materials, these blanks would error. This change skips adding the blank textures to the list of textures that are loaded later. --- read_ascii_xps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/read_ascii_xps.py b/read_ascii_xps.py index 12bcfb4..b17b344 100644 --- a/read_ascii_xps.py +++ b/read_ascii_xps.py @@ -117,6 +117,9 @@ def readMeshes(file, hasBones): # print('Texture file', textureFile) uvLayerId = ascii_ops.readInt(file) + if not textureFile: + continue + xpsTexture = xps_types.XpsTexture(texId, textureFile, uvLayerId) textures.append(xpsTexture)