Files
workinf_Blender_Wasm/docs/tasks/WBV2-P1424-001-desktop-completion/DW06.md
mes123456 f3e21c6b98
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-10 11:18:01 +08:00

59 lines
3.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DW06:项目文件、撤销恢复和外部资源
- stage: `scene-workflow`
- queueTask: `WBV2-P1424-001`;parent: `WBV2-P1424-000`;nextTask: `null`
- 包状态:`planned_gap_closure`(并不表示已有源码尚未实现)
- 完整交付依赖:DW04, DW05
- 工作量级:L;不表示日期承诺
- validation: `NOT_RUN`;acceptance: `NOT_CLAIMED`
## 优先复用的十多天成果
PROJECT/STORAGE 已实现,已有 native save/open、resource persistence 和历史恢复路径。
相关交接仅作按需引用:
- `tests/golden/WBV2-P1424-001/resource-persistence-user-test.md`
- `tests/golden/WBV2-P1424-001/persistent-sessions-resources-implementation.md`
先对照当前小范围源码和最新交接保留已实现子项;只有缺功能、缺接线或缺必要依赖才新增实现。历史状态不自动当作当前缺口。
## 操作者工作流与交付
创建/打开 blend → 多步编辑 → 撤销/重做 → 保存/另存 → 重开与恢复
后续功能可以共用的完整项目生命周期;操作者不会遇到能编辑但保存后丢失的独立入口。
## 最小生产入口
- `blender-5.2.0/source/blender/web_engine/web_engine_main_state.cpp`
- `blender-5.2.0/source/blender/web_engine/web_engine_api.cpp`
- `web/app/src/workers/web-engine.worker.ts`
- `web/protocol/web-engine.ts`
- `blender-5.2.0/source/blender/windowmanager/intern/wm_files.cc`
- `web/app/src/app/App.tsx`
- `web/app/src/app/desktop-workspace-storage.ts`
以上为聚焦入口,非要求全文加载。使用源码聚焦工具、精确 --source/--unit 和函数片段;接入新 operator 时追加其具体原生文件,单次最多 8 个精确源码文件。没有默认测试入口或要运行的 fixture;功能完成前不执行任何验证。
## 只补未完成部分
1. 复用真实 blend I/O,补齐当前所有已启用 Main ID、screen/workspace/tool settings 与库引用的读写,不只保存显示快照。
2. 统一 operator undo groups、modal cancel、跨编辑器历史、Main replacement 和 native handle 失效机制。
3. 外部图像/字体/音视频/缓存支持虚拟文件映射、相对路径、pack/unpack、缺失资源定位和重链接。
4. 实现浏览器保存/下载/授权目录/自动保存/恢复的实际入口,处理配额不足、写入失败和中断的事务边界。
5. 保持 GPU 缓存/Worker token 不写入 blend;重开由原生数据重新构建;取消旧请求不得污染新文件。
6. 给后续每个功能包提供同一 persistence/history 契约,不复制独立存储逻辑。
## 失败边界
文件/恢复错误必须保留当前可用项目;不将临时 buffer/canvas 数据当工程文件。
## 实现交接与后续使用
交付前必须具有实际入口→原生执行→消费者/结果→错误/取消→适用 history/save 的生产代码。这里是实现交付条件,不运行验收;编译成功不能替代功能。旧的已完成子项可引用并保留,不能声称本轮重新实现。
用户使用阶段的场景(现在不执行):带外部贴图编辑并撤销/重做,打包保存,关闭后重开,再从自动保存恢复。
每次记录保留成果、补齐断点、仍有缺口、必要构件与下一动作。共同规则见同目录 `EXECUTION.md`,首次领取时阅读;不要将完整计划作为后续执行上下文。