Godot Aseprite Wizard 项目教程
1. 项目的目录结构及介绍
godot-aseprite-wizard/
├── addons/
│ └── aseprite_wizard/
│ ├── icons/
│ ├── importers/
│ ├── scenes/
│ ├── scripts/
│ ├── wizard/
│ ├── plugin.cfg
│ └── README.md
├── docs/
│ └── README.md
├── screenshots/
│ └── example.png
├── .gitignore
├── LICENSE
└── README.md
目录结构介绍
- addons/: 包含插件的主要代码和资源。
- aseprite_wizard/: Aseprite Wizard 插件的核心目录。
- icons/: 存放插件使用的图标文件。
- importers/: 包含用于导入 Aseprite 文件的脚本。
- scenes/: 存放插件使用的场景文件。
- scripts/: 包含插件的主要脚本文件。
- wizard/: 包含与 Aseprite 导入相关的脚本。
- plugin.cfg: 插件的配置文件。
- README.md: 插件的说明文档。
- aseprite_wizard/: Aseprite Wizard 插件的核心目录。
- docs/: 存放项目的文档文件。
- README.md: 项目的详细说明文档。
- screenshots/: 存放项目的截图文件。
- example.png: 示例截图。
- .gitignore: Git 忽略文件配置。
- LICENSE: 项目的开源许可证文件。
- README.md: 项目的根目录说明文档。
2. 项目的启动文件介绍
项目的启动文件主要是 plugin.cfg
文件,它位于 addons/aseprite_wizard/
目录下。这个文件是 Godot 插件的配置文件,用于定义插件的名称、作者、版本等信息。
plugin.cfg 文件内容示例
[plugin]
name="Aseprite Wizard"
description="Godot Editor plugin to help import Aseprite animations to AnimationPlayers"
author="Vinicius Gerevini"
version="1.0"
script="wizard/aseprite_wizard.gd"
启动文件介绍
- name: 插件的名称。
- description: 插件的描述信息。
- author: 插件的作者。
- version: 插件的版本号。
- script: 插件的主脚本文件路径。
3. 项目的配置文件介绍
项目的配置文件主要包括 plugin.cfg
和 Editor -> Editor Settings -> Aseprite
中的配置项。
plugin.cfg 配置文件
如上所述,plugin.cfg
文件用于定义插件的基本信息。
Editor Settings 配置
在 Godot 编辑器中,可以通过 Editor -> Editor Settings -> Aseprite
来配置 Aseprite 的相关设置。
配置项
- Command Path: 设置 Aseprite 可执行文件的路径。
- Animation > Layer > Exclusion Pattern: 设置排除层的正则表达式模式。
项目特定配置
在项目设置中,可以通过 Project -> Project Settings -> General > Aseprite
进行项目特定的配置。
配置项
- Layer Exclusion Pattern: 设置排除层的正则表达式模式。
- Split layers in multiple resources: 是否将每个层导出为单独的资源。
- Only include visible layers: 是否仅导出可见层。
- Do not create resource file: 是否不创建 SpriteFrames 资源文件。
通过这些配置,可以灵活地控制 Aseprite 文件的导入行为。