feat: auto-preview, timestamped/grouped output, folder memory; fix batch format
- Auto-preview the first image after a folder loads (both panels), so the canvas isn't empty (§17.8). - Group exports as <output_dir>/<timestamp>/<print_stem>/<garment_stem>.<ext>; one timestamp per export run, shared across the batch (§17.9). - Remember the last garment/print folders and reopen the picker there; persisted via config, wired through main_window (§17.10). - Shrink the 3 box templates further and lower them (chest placement). - Fix: batch export ignored the chosen format/quality/output dir because the queue never received ExportOptions. Export panel now emits export_options_changed → queue.set_export_options (+ initial sync) (§17.11). Docs: PRD 6.1/6.8/9, architecture 4.12, UI design 5.1, tasks.md 17.8–17.11. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+9
-1
@@ -96,6 +96,7 @@
|
||||
- 支持单独选中或取消选中某张衣服图片。
|
||||
- 支持单独选中或取消选中某张印花图片。
|
||||
- 支持选择当前预览使用的衣服图和印花图。
|
||||
- **记住上次选择的衣服文件夹和印花文件夹**:分别持久化,下次打开「打开文件夹」对话框时定位到上次的位置;目录已不存在时回退到系统默认位置。
|
||||
- 加载失败时显示可理解的错误信息。
|
||||
- 忽略不支持的文件格式,并在日志中记录。
|
||||
|
||||
@@ -162,7 +163,7 @@
|
||||
- 用户点击模板后,印花位置、尺寸、旋转参数立即应用到当前预览。
|
||||
- 模板参数应基于衣服底图尺寸计算,避免只适配单一图片分辨率。
|
||||
- 模板的 `width_ratio` / `height_ratio` 定义衣服上的**目标框**,而非强制拉伸尺寸。已知印花原始尺寸时,印花按自身宽高比缩放后 contain 进目标框并居中,不被拉伸变形;未知印花尺寸时退化为铺满目标框。
|
||||
- 内置模板尺寸以贴近真实印花占比为准(例如正方形模板约为衣服宽度的 1/3),避免印花占据过大面积。
|
||||
- 内置模板尺寸以贴近真实印花占比为准(例如正方形模板约为衣服宽度的 1/6,居中偏下),避免印花占据过大面积。
|
||||
- 选中的模板是**粘性**的:在预览区切换衣服或切换印花时,印花不应丢失,应按当前选中模板基于新的衣服/印花尺寸重新计算落位,而非回退到画布的写死默认值。已手动微调的项不受影响,仍使用其自身参数。
|
||||
- **记住上次选择的模板**:程序退出前持久化当前选中的模板,下次启动自动恢复选中该模板。若该模板为自定义模板且已被删除,则回退到第一个内置模板。
|
||||
- 提供 `位置` / `尺寸` / `旋转` **三项独立的重置**,分别只把对应参数还原为当前选中模板的值(位置→模板居中位置;尺寸→模板目标框内适配的大小;旋转→模板角度,通常为 0),三者互不影响。
|
||||
@@ -192,6 +193,8 @@
|
||||
- 支持 JPG、PNG 输出。
|
||||
- 支持输出质量设置。
|
||||
- 文件名应避免覆盖已有文件,除非用户确认。
|
||||
- 输出按「运行时间戳 → 印花」两级分组:每次导出运行先在输出目录下新建一个时间戳文件夹,其内再按印花分子文件夹,即 `输出目录/<时间戳>/<印花文件名>/<衣服文件名>.<扩展名>`(单张导出与批量导出一致)。
|
||||
- 一次导出运行(一次批量,或一次单张)共用同一个时间戳,避免重复生成时互相覆盖或混在一起。
|
||||
|
||||
### 6.9 批量合成导出
|
||||
|
||||
@@ -292,6 +295,10 @@ AutoPrint/
|
||||
templates.json
|
||||
logs/
|
||||
output/
|
||||
<时间戳>/ # 每次导出运行一个时间戳文件夹(如 20260617_143022)
|
||||
<印花文件名>/ # 其内按印花分组,子文件夹以印花文件名命名
|
||||
<衣服文件名>.png
|
||||
...
|
||||
resources/
|
||||
```
|
||||
|
||||
@@ -329,6 +336,7 @@ AutoPrint/
|
||||
|
||||
说明:
|
||||
|
||||
- `last_garment_dir` / `last_print_dir`:上次打开的衣服 / 印花文件夹路径,用于让文件夹对话框定位到上次位置。
|
||||
- `last_template`:上次选中的模板名称,用于启动恢复。
|
||||
- `last_batch_mode`:上次选择的批量模式(取 `BatchMode` 枚举值,如 `full_combo` / `many_garments` / `many_prints` / `one_to_one`)。
|
||||
- 偏好的读取、分发与「改一次存一次」由主窗口集中处理,UI 控件不直接读写配置文件。
|
||||
|
||||
Reference in New Issue
Block a user