mirror of
https://github.com/Tribes2-SCP/AssetCompat.git
synced 2026-01-19 12:14:46 +00:00
Sanitizing of object names & not filtering potentially important dirs
This commit is contained in:
parent
05181fadd7
commit
3151105f93
|
|
@ -2,7 +2,7 @@ import os
|
|||
import sys
|
||||
|
||||
class Application(object):
|
||||
ignored_directories = ["textures", "commander", "gui", "details", "special"]
|
||||
ignored_directories = ["textures", "commander", "gui"]
|
||||
|
||||
material_template = """
|
||||
singleton Material({name})
|
||||
|
|
@ -33,9 +33,11 @@ singleton Material({name})
|
|||
if (path == "."):
|
||||
for exclusion in self.ignored_directories:
|
||||
try:
|
||||
directories.remove("exclusion")
|
||||
directories.remove(exclusion)
|
||||
except ValueError: pass
|
||||
|
||||
continue
|
||||
|
||||
for file in files:
|
||||
if (os.path.isfile(file) is not True):
|
||||
continue
|
||||
|
|
@ -44,6 +46,7 @@ singleton Material({name})
|
|||
|
||||
material_name = os.path.basename(full_path)
|
||||
material_name = os.path.splitext(material_name)[0].upper()
|
||||
material_name = material_name.replace(".", "")
|
||||
|
||||
material = { "name": material_name, "path": full_path, "opening": "{", "closing": "}" }
|
||||
materials.append(material)
|
||||
|
|
|
|||
Loading…
Reference in a new issue