mirror of
https://github.com/Tribes2-SCP/AssetCompat.git
synced 2026-01-19 20:24:53 +00:00
Added some scripts to generate a material list for the original Tribes2 texture files.
This commit is contained in:
commit
1f29bad242
2
genmatlist.bat
Normal file
2
genmatlist.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
dir /b /s compat\base\textures > ..\t3mats.txt
|
||||
python genmatlist.py
|
||||
19
genmatlist.py
Normal file
19
genmatlist.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import os
|
||||
import io
|
||||
import sys
|
||||
f = open ('../t3mats.txt','r')
|
||||
tf = open('materials.cs','w')
|
||||
for name in f:
|
||||
tf.write('singleton Material( "'+name.split('compat\\base\\textures\\')[-1].upper().replace('.png','').replace('.PNG','').rstrip("\n\r").split('\\')[-1]+'" )\n')
|
||||
tf.write('{\n')
|
||||
tf.write('diffuseMap[0] = "'+name.split('compat\\base\\textures\\')[-1].replace("\\","/").replace('.png','').replace('.PNG','').rstrip("\n\r")+'";\n')
|
||||
tf.write('mapTo = "'+name.split('compat\\base\\textures\\')[-1].upper().replace('.png','').replace('.PNG','').rstrip("\n\r").split('\\')[-1]+'";\n')
|
||||
tf.write('\n')
|
||||
tf.write('};\n')
|
||||
tf.close()
|
||||
#singleton Material( BlankWhite )
|
||||
#{
|
||||
# diffuseMap[0] = "core/art/white";
|
||||
# mapTo = "white";
|
||||
# materialTag0 = "Miscellaneous";
|
||||
#};
|
||||
Loading…
Reference in a new issue