From 18df4a043a55c4e09c954a69eefa36abec18888f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 28 Jul 2017 14:09:32 +0200 Subject: [PATCH] Converter.: Put temporary files into working dir --- tools/Texture_Converter.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/Texture_Converter.py b/tools/Texture_Converter.py index 2162f3b94..dd33a1150 100755 --- a/tools/Texture_Converter.py +++ b/tools/Texture_Converter.py @@ -40,9 +40,9 @@ base_dir = home + "/tmp/pp" tex_dir = base_dir + "/assets/minecraft/textures" def convert_alphatex(one, two, three, four, five): - os.system("convert "+one+" -crop 1x1+"+three+" -depth 8 -resize "+four+"x"+four+" "+base_dir+"/__TEMP__.png") - os.system("composite -compose Multiply "+base_dir+"/__TEMP__.png "+two+" "+base_dir+"/__TEMP2__.png") - os.system("composite -compose Dst_In "+two+" "+base_dir+"/__TEMP2__.png -alpha Set "+five) + os.system("convert "+one+" -crop 1x1+"+three+" -depth 8 -resize "+four+"x"+four+" "+working_dir+"/__TEMP__.png") + os.system("composite -compose Multiply "+working_dir+"/__TEMP__.png "+two+" "+working_dir+"/__TEMP2__.png") + os.system("composite -compose Dst_In "+two+" "+working_dir+"/__TEMP2__.png -alpha Set "+five) def target_dir(directory): if make_texture_pack: @@ -120,8 +120,8 @@ def convert_textures(): FOLIAG = tex_dir+"/colormap/foliage.png" GRASS = tex_dir+"/colormap/grass.png" - os.system("convert "+GRASS+" -crop 1x1+70+120 -depth 8 -resize "+str(PXSIZE)+"x"+str(PXSIZE)+" "+base_dir+"/__TEMP__.png") - os.system("composite -compose Multiply "+base_dir+"/__TEMP__.png "+tex_dir+"/blocks/grass_top.png "+target_dir("/mods/ITEMS/mcl_core/textures")+"/default_grass.png") + os.system("convert "+GRASS+" -crop 1x1+70+120 -depth 8 -resize "+str(PXSIZE)+"x"+str(PXSIZE)+" "+working_dir+"/__TEMP__.png") + os.system("composite -compose Multiply "+working_dir+"/__TEMP__.png "+tex_dir+"/blocks/grass_top.png "+target_dir("/mods/ITEMS/mcl_core/textures")+"/default_grass.png") convert_alphatex(GRASS, tex_dir+"/blocks/grass_side_overlay.png", "70+120", str(PXSIZE), target_dir("/mods/ITEMS/mcl_core/textures")+"/default_grass_side.png")