diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-07-16 15:45:25 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-07-16 15:45:25 -0700 |
commit | 4fda34c681d456ce0915b9ece4cbfac65bafe3a6 (patch) | |
tree | 80cdf521d08f83d5103cee768b5805d828928df5 /tools/file_packager.py | |
parent | 535d77186f49307e08072e3c1e82c89b6848c7a7 (diff) |
add commented option to make crunch try a png input if crunching the dds failed
Diffstat (limited to 'tools/file_packager.py')
-rw-r--r-- | tools/file_packager.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/file_packager.py b/tools/file_packager.py index 3844b4ae..8c1e0a43 100644 --- a/tools/file_packager.py +++ b/tools/file_packager.py @@ -182,6 +182,10 @@ if crunch: except: format = [] Popen([CRUNCH, '-file', file_['name'], '-quality', crunch] + format, stdout=sys.stderr).communicate() + #if not os.path.exists(os.path.basename(crunch_name)): + # print >> sys.stderr, 'Failed to crunch, perhaps a weird dxt format? Looking for a source PNG for the DDS' + # Popen([CRUNCH, '-file', unsuffixed(file_['name']) + '.png', '-quality', crunch] + format, stdout=sys.stderr).communicate() + assert os.path.exists(os.path.basename(crunch_name)), 'crunch failed to generate output' shutil.move(os.path.basename(crunch_name), crunch_name) # crunch places files in the current dir # prepend the dds header crunched = open(crunch_name, 'rb').read() |