Skip to content

Commit

Permalink
Warn, rather than fail, when more than one texture matched
Browse files Browse the repository at this point in the history
  • Loading branch information
ndevenish committed Dec 7, 2016
1 parent 9ffecac commit 1566291
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion io_EDM/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ def _find_texture_file(name):
print("Warning: Could not find texture named {}".format(name))
return None
# print("Found {} as: {}".format(name, files))
assert len(files) == 1
if len(files) > 1:
print("Warning: Found more than one possible match for texture named {}. Using {}".format(name, files[0]))
files = [files[0]]
textureFilename = files[0]
return os.path.abspath(textureFilename)

Expand Down

0 comments on commit 1566291

Please sign in to comment.