批处理生成动画文件(cocos2d,每组动画一个plist)

@echo off
color 0a
del /s /q /f tmp1.txt
:: 角色动画
dir /b /a:d 动画\角色动画 >> tmp1.txt
rmdir /s /q  "..\animations"
mkdir ..\animations
mkdir ..\animations\characters
mkdir ..\animations\effects
for /f %%i in (tmp1.txt) do (
@echo 正在生成动画文件:%%i
"tp\\TP.exe" --smart-update --format cocos2d --data ../Animations/Characters/%%i.plist --sheet ../Animations/Characters/%%i.png --replace .*\\/= --max-height 2048 --max-width 2048 --scale 0.5 --dither-fs 动画/角色动画/%%i
)
del /s /f /q tmp1.txt
:: 特效动画
dir /b /a:d 动画\特效动画 >> tmp1.txt
for /f %%i in (tmp1.txt) do (
@echo 正在生成动画文件:%%i
"tp\\TP.exe" --smart-update --format cocos2d --data ../Animations/Effects/%%i.plist --sheet ../Animations/Effects/%%i.png --replace .*\\/= --max-height 2048 --max-width 2048 --scale 0.5 --dither-fs 动画/特效动画/%%i
)
del /s /f /q tmp1.txt
pause


原文地址:https://www.cnblogs.com/iapp/p/3631727.html