Spine大量匯出Command line Export

來源:互聯網
上載者:User

標籤:

1.準備工作及介紹

時間有點緊張,寫的不是很詳細,請見諒。

目前的版本是2.2以上,購買版的。試用版的無法試用Command line

Both Spine and the Spine launcher must be 2.1.00 or higher to perform command line export. To update the Spine launcher, download and reinstall Spine.

將Spine的安裝目錄設定到系統內容變數中(我的電腦,右鍵,屬性,進階系統屬性,環境變數,系統變數的path 中添加)\

配置成功之後,可以在cmd命令列中輸入Spine -h 會出現匯出協助。如下面:

Editor:-h, --help       Print this help message and exit.-v, --version    Print version information and exit.-l, --logout     Logout, removing activation code.-k, --keys       Enable hotkey popups by default.-n, --notimeout  Disable timeout when checking for and downloading updates.-x, --proxy      Proxy server to use when checking for and downloading updates.-s, --scale      Experimental: UI scale, default is 1.0.project.spine    Path to Spine project file to open.Export:-i, --input   Path to Spine project file, overrides export settings JSON.-o, --output  Path to write export file(s), overrides export settings JSON.-e, --export  Path to export settings JSON file.Pack:-i, --input   Path to folder of images to be packed.-o, --output  Path to write texture atlas files.-p, --pack    Texture atlas name or path to pack settings JSON file.Examples:Spine --export /path/to/export.jsonSpine --export "/path/with spaces/to/export.json"Spine --input /path/to/project.spine --output /path/to/output/      --export /path/to/export.jsonSpine -i /path/to/project.spine -o /path/to/output/ -e /path/to/export.jsonSpine -e /path/to/export1.json -e /path/to/export2.jsonSpine -i /path/to/images/ -o /path/to/output/ --pack /path/to/pack.jsonSpine -i /path/to/images/ -o /path/to/output/ -p /path/to/pack.jsonSpine -i /path/to/project1.spine -o /path/to/output/ -e /path/to/export1.json      -i /path/to/project2.spine -e /path/to/export2.json -i /path/to/images/      -o /path/to/output/ -p /path/to/pack.json

-i 需要匯出的 XX.spine路徑

-o 匯出路徑

-e 設定json 註:我們可以在spine 軟體中, spine ->export中進行設定,然後點擊save,儲存一個json檔案,就是匯出時需要的檔案。我這裡起名字為spinesetting.json

-i spine路徑 -o 匯出路徑 -e setting.json路徑
在工具裡面,根據我們的需求設定完成後,然後點擊save,儲存一個json檔案,就是咱們需要的json檔案

另一種是 -i -o -p

-p Texture atlas name or path to pack settings JSON file.
2.使用bat,大量操作

下面是我寫的一個bat命令。複製出來,然後建立個test.bat,複製就可以,然後修改一下。bat命令我不太熟悉,請見諒。。。

@echo offset DIR=%~dp0echo - cleanupif exist "%DIR%SpineExport" rmdir /s /q "%DIR%SpineExport"mkdir "%DIR%SpineExport"echo -spineExportfor /f "delims=" %%i in (‘dir /b/a-d/s %DIR%SpineSource\*.spine‘) do Spine -i %%i -o "%DIR%SpineExport" -e "%DIR%spinesetting.json"echo -exportEndpause
set DIR=%~dp0 :設定DIR變數為當前絕對路徑
for /f "delims=" %%i in (‘dir /b/a-d/s %DIR%SpineSource\*.spine‘) :遍曆檔案夾下和子檔案夾下的.spine類型檔案 ,並執行匯出命令。


官網文檔 http://zh.esotericsoftware.com/spine-export

Spine大量匯出Command line Export

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.