commit 1f29bad24220bf74abaaa31cbbc632c183335224 Author: Calvin Balke Date: Sat Nov 21 16:16:52 2015 -0800 Added some scripts to generate a material list for the original Tribes2 texture files. diff --git a/genmatlist.bat b/genmatlist.bat new file mode 100644 index 0000000..d5a986d --- /dev/null +++ b/genmatlist.bat @@ -0,0 +1,2 @@ +dir /b /s compat\base\textures > ..\t3mats.txt +python genmatlist.py \ No newline at end of file diff --git a/genmatlist.py b/genmatlist.py new file mode 100644 index 0000000..976684d --- /dev/null +++ b/genmatlist.py @@ -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"; +#};