Skip to content
Permalink
Browse files

blacklist image source files like xcf and other formats, fix #1

fix #1
obsolete #3
  • Loading branch information...
illwieckz committed Apr 4, 2017
1 parent 79be17f commit 070394fc7648d9715cbd38b8ff568a88dac4a719
Showing with 13 additions and 0 deletions.
  1. +13 −0 sloth.py
@@ -49,6 +49,14 @@ class ShaderGenerator(dict):
# basename of the per-set option file
defaultSlothFile = "options"+slothFileExt

# common file extensions for image source
extBlackList = \
[
".ora",
".psd",
".xcf",
]


def __init__(self, verbosity = 0):
self.verbosity = verbosity
@@ -563,6 +571,11 @@ def generateSet(self, path, setname = None, cutextension = None):
for filename in filelist:
mapname, ext = os.path.splitext(filename)

# check if this file extension is not among known unsupported ones
if ext.lower() in self.extBlackList:
self.verbose(filename + ": Unsupported format")
continue

if ext == self.slothFileExt:
slothfiles.add(mapname)
else:

0 comments on commit 070394f

Please sign in to comment.
You can’t perform that action at this time.