egret-docs-master/DB/dbPro/import/importCommandLine/README.md

31 lines
1.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

DragonBones pro 从 4.3 开始支持命令行导入,实现批处理
``` typescript
Import ( dbdata=""texturefolder="" textureatlas="xxx.png" texturedata="" dbdatapack=""plugin="auto"projectname=""projectpath="")
```
命令名import
参数列表:
|参数|说明|
| ------------ | ------------ |
|dbdata|散图或纹理集项目中,导入项目的数据问题路径。|
|texturefolder|散图项目中,图片资源路径。|
|textureatlas|纹理集项目中,纹理集图片资源路径。|
|texturedata|纹理集项目中,纹理集数据文件资源路径。|
|dbdatapack|zip项目中zip文件的资源路径。|
|plugin|【可选参数】仅当导入的项目是散图项目或纹理集项目时可用用于指定导入所使用的插件名称。默认是auto即会根据实际数据自动选择插件解析如为任意不存在插件名称会使用DragonBonesPro自带引擎解析。|
|projectname|【可选参数】导入后新项目的名称,默认为原数据的名称。|
|projectpath|【可选参数】导入后新项目的地址默认为用户文档目录下DBProjects文件夹下。|
上表所示参数中,根据不同的导入类型,需要填写的必选参数是不同的
- 导入散图项目dbdata, texturefolder 是必选参数
示例: `DragonBonesPro import dbdata="C:\Demon.ExportJson" texturefolder="C:\texture" plugin="auto" projectname="new" projectpath="C:\ceshi"`
- 导入纹理集项目dbdatatextureatlastexturedata 是必选参数
示例: `DragonBonesPro import dbdata="C:\Demon.ExportJson" textureatlas="C:\Demon0.png" texturedata="C:\Demon0.plist" plugin="auto" projectname="new" projectpath="C:\ceshi"`
- 导入数据包项目dbdatapack是必选参数
示例: `DragonBonesPro import dbdatapack="C:\DragonOpening.zip" projectname="new" projectpath="C:\ceshi"`
 
注意:以上三种导入类型是互斥的,导入时只可根据一种导入类型填写参数。