2

I'm currently writing a batch script to generate sprite sheets using TexturePacker's Command-line Tool.

for /f "delims=" %%i in ('dir /b sprites') do (
    TexturePacker --format "json" --data "sheets/%%i.json" --sheet "sheets/%%i.png" "sprites/%%i"
)

Quite simple so far but I was wondering if it were possible to generate a [*.tps] file from the tool as well. So that if someone wants to check the properties of the export they can do so through the TexturePackerGUI.

jshbrntt
  • 5,134
  • 6
  • 31
  • 60

2 Answers2

0

This is the bash script I use to build all .tps files in a folder:

#!/bin/bash
for i in *.tps; do TexturePacker assets/texture_packer/$i; done
Phil McCullick
  • 7,175
  • 2
  • 29
  • 29
  • but it wouldn't gnerate new tps file, looks like by deault TexturePacker doesnot genertae the .tps file, how to generate one from command line ? – Eklavyaa Aug 13 '19 at 11:06
-1

This batch script generate all *.tps in folder:

for /R %%f in (*.tps) do "c:\Program Files\CodeAndWeb\TexturePacker\bin\TexturePacker.exe" %%f 
Paul
  • 1